It's one of the simplest if not the simplest load balancing algorithm. It distribute requests by walking the list of servers and assigning a request to each server in turn. On the downside, it assumes that all requests take the same amount of time, which is obviously not true in practice.
An example of the code used by the client to assign requests to servers, using liblb/r2
Go package, which implements Round Robin.
// define a round-robin load balancer lb := r2.New("127.0.0.1:8009", "127.0.0.1:8008", "127.0.0.1:8007") for i := 0; i < 10; i++ { // picks one of the hosts, sequentially host, err := lb.Balance() if err != nil { log.Fatal(err) } fmt.Printf("Send request #%d to host %s\n", i, host) }