
How does load balancer works?⚖️
Load Balancer Basics Every Backend Engineer Should Know! ⚖️
?️ Load balancer
A machine running software like NGINX or HAProxy. Every request hits it first, and it forwards the request to one of the application servers behind it.
? Round robin
Requests go to servers in a fixed order. Works when every request takes about the same time.
? Least connections
The next request goes to the server with the fewest open connections. Useful when slow requests, like a 2-second checkout, pile up on one server.
? Health check
A small request sent to every server every 5 seconds. Three missed replies in a row marks the server unhealthy, and traffic stops going to it.
? Active-passive
Two load balancers share one virtual IP. If the active one fails, the standby takes the IP and users keep hitting the same address.
? Which fails first under real traffic, the servers or the load balancer? Drop your answer in the comments.
#LoadBalancer #SystemDesign #DevOps #LeastConnections #RoundRobin #HealthCheck #Failover #HighAvailability #BackendEngineering #Shorts
?️ Load balancer
A machine running software like NGINX or HAProxy. Every request hits it first, and it forwards the request to one of the application servers behind it.
? Round robin
Requests go to servers in a fixed order. Works when every request takes about the same time.
? Least connections
The next request goes to the server with the fewest open connections. Useful when slow requests, like a 2-second checkout, pile up on one server.
? Health check
A small request sent to every server every 5 seconds. Three missed replies in a row marks the server unhealthy, and traffic stops going to it.
? Active-passive
Two load balancers share one virtual IP. If the active one fails, the standby takes the IP and users keep hitting the same address.
? Which fails first under real traffic, the servers or the load balancer? Drop your answer in the comments.
#LoadBalancer #SystemDesign #DevOps #LeastConnections #RoundRobin #HealthCheck #Failover #HighAvailability #BackendEngineering #Shorts
KodeKloud
...