Thursday, October 1, 2020

Load Balancer

 Load Balancer

-> Load Balancer is used in a distributed system design tool.

-> Principle of load balancing ensure that you do not have duplicates request to the same server.

-> Balancing the load and not sending duplicates to the same server.

Ex: Users sends a request on the internet which reaches to load balancer and the load balancer allows traffic to one of the webserver. if any of one server is down, other server serve the request.

Load Balancing Algorithms

-> Round Robin (Request will be routed to each server sequence)

-> Least Connection (when we need sticky session) [storing some data on particular webserver then until session gets over all the requests will be routed to the same server.]

-> Least Bandwidth(it routes traffic to the server which is serving list amount of traffic major in bandwidth)

-> IP Hash (Based on user IP address)

What if Load Balancer fails?

Create two load balancer in clustered mode. If one fails second one pick up the traffic and sent to webserver. This is about redundancy about load balancer. 

How can we prevent from disaster recovery?

We can create a global and local load balancer in different regions.

Advantages of Load Balancer

-> User experience is faster and uninterrupted services

-> Less downtime and higher throughput

-> Zero downtime to update webserver

-> Flexible to scaleup and scaledown

Message Queue
It takes request, persists them, assigns them to the correct server waits for them to complete.
if it's taking too long for the server to give an acknowledgment, it feels that server is dead and assigns it to the next server.

No comments:

Post a Comment

SOA Overview Part-1

  Middleware It provides a mechanism for the process to interact with other processes running on multiple network machines. Advantages...