Load Balancer | System Design Part - 3

Load Balancer | System Design Part - 3

This is part 3 of the?SYSTEM DESIGN SERIES. where we will be discussing about?LoadBalancer.

From the previous parts (Single Server Setup?/?Databases), we have had an understanding of how the request traverse from user to a web server and to the database, Now let's check whether our system is capable of providing failover or how it handles if the webserver goes down

With the increase in the traffic, the load on the server will be drastically increased and it leads to more latency in the requests. which will impact the user experience or the server gets crashed because of a high bump in the traffic.?

If the server is offline in that case, the user will not be able to access the website.

To avoid this we can add multiple servers, but how come can we route the user requests to the servers which we have added??


Here comes the LoadBalancer, It will help us in routing the user requests to the right server based on the availability and load on the server.

No alt text provided for this image

After introducing a load balancer, the end-users cannot access the web servers directly. They can access the load-balancer which will internally call the webservers.

For security reasons, it is advisable to make the webservers have private IPs so that no one from outside the network can access the servers.

From the above picture, we can see that the web servers are having private IPs and the load balancer is having public IP. which is internally allocating the requests based on availability. With this setup, we can resolve the failover issue and improve the availability of the servers.

  • If one server fails or down, all the requests will be routed to the second server and a new healthy server will be created in that place
  • Over a period of time if there is more traffic, and if the existing servers are not enough to handle the load, we can simply add new servers. Load balancer can gracefully identify those servers and start sending requests to them.


Now the web tier looks good, what about the data tier?


In our current design, we have only one database, which cant handle failover and redundancy, most commonly used approach to address this problem is by DATABASE REPLICATIONS, Lets look into that in our next article.

要查看或添加评论,请登录

Sai Srikanth Avadhanula的更多文章

  • Content Delivery Network | System Design part - 7

    Content Delivery Network | System Design part - 7

    Content Delivery Network is a network that acts as a network for servers which are spread over a wide area across the…

  • Cache | System Design Part - 6

    Cache | System Design Part - 6

    In the last part of the SYSTEM DESIGN SERIES, we have gone through HIGH-LEVEL DESIGN, which gave us a clear picture of…

  • High Level Design | System Design Part - 5

    High Level Design | System Design Part - 5

    In the last few parts of the SYSTEM DESIGN SERIES, we have discussed multiple concepts from web servers to databases…

  • Database Replication | System Design Part - 4

    Database Replication | System Design Part - 4

    In the previous article, we have discussed about LoadBalancer and how it plays a key role in web servers scalability…

  • Databases | System Design Part - 2

    Databases | System Design Part - 2

    This is part 2 in the SYSTEM DESIGN SERIES, where we are going to discuss each and every topic which helps the system…

  • Single Server Setup | System Design Part - 1

    Single Server Setup | System Design Part - 1

    With the increase in the data-centric world, it is vital in building a scalable system that can handle millions of…

社区洞察

其他会员也浏览了