Round-robin in Distributed Systems
Sep 27, 2016Gao Chao

Summary
This post details the implementation of round-robin logic for client-side load balancing between Grab's Common Data Service (CDS) clients and servers. It addresses issues encountered with AWS Elastic Load Balancers (ELB) and explores DNS discovery as an alternative. Two methods for implementing round-robin are presented: a mutex-based approach for simple cases and a channel-based approach for more complex scenarios requiring granular control over operation timeouts and centralized management. A bug in an external srv-lb package was also identified and fixed.