/dev/eng [main]
cat load-balancing.md

Load Balancing

Aug 22, 2020

client                                servers

c1 () \  ------------                 () A
c2 () -  | load     | -- server       () B
c3 () -  | balancer | -- selection    () C
c5 () /  ------------    strategy     () D

Server selection strategy

  • round robin
  • random
  • consistent hashing
  • rendezvous hashing

Things to consider:

  • When you add a new server. What happens?

Ring of possible hashes are
broken up and assigned to specific
nodes. When a new node is added, keys
need to be re-balanced.
  ___
 / | \
|--|--|
 \ | /
  --