A load balancer evenly distributes incoming traffic among web servers.
Users connect to the public IP of the load balancer directly. After a load balancer and second web server added, we successfully solved no failover issue and improved availability of the web tier.

If server 1 goes offline, all traffic will routed to server 2. This prevents the website from going offline. If the traffic grows rapidly, and two servers are not enough to handle it, the load balancer can handle this problem gracefully. We only need to add more servers to the web server pool, the load balancer automatically starts to send requests to them.
Load balancers improve system’s availability, scalability, security and performance.
There are 2 main categories of Load Balancing Algorithms:
- Statis Load Balancing Algorithms:
It follows fixed rules and independent of current server state.
Examples: Round Robin Method, Weighted Round Robin, IP Hash method - Dynamic Load Balancing Algorithms:
It examines current state of server before distributing the traffic.
Examples: Least Connection Method, Weighted Least Connection Method, Least response time method, Resource-based method.
Now web tier looks good but what about data tier. The current design has one database so it does not support failover and redundancy. Database Replication is a common technique to address these problems.
…Next : Database Replication


Leave a reply to System Design -2 Vertical vs Horizontal scaling – DevScript Saga Cancel reply