Design a load balancer
Why load balancing: E.g. to handle million/billion users, we need to have 10000 servers. Thus we need to load balancing the requests uniformly distributed to our 'healthy' servers.
这里Bittiger 提供了一个讲硬件load balancer的视频。我总结了一下笔记。
Load balancing 算法: round robin, random, current connections count, response time.
Follow - on traffic (同一个request map到同一个server上。):
long-lived TCP connection
- keep track of open connections
short-lived
Source address affinity (not reliable)
Deep packet Inspection (use cookie)
- pros: reliable
- cons: less through put (flow table.)
原来F5就是卖负载均衡器得。L7型号得load balancer。 在6k吞吐量时候可以达到1000k的qps.就是所每个request小于6k的数据的话,一个load balancer就可以刚1million的qps了。感觉好厉害啊。