Load Balancing
# Introduction
Generally refers to efficiently distributing incoming network traffic across a group of backend servers
- So generally there has to be mulitple servers that any given request could be processed to
A load balancer is basically a “traffic cop” that sits in front of all of these backend servers and routes the client requests across the different servers in a manner that is optimal for speed and efficiency of request completion
Pasted image 20230224213720.png
# Load Balancing Algorithims
Round Robin Requests are distirbuted across the backend servers sequentially
Least Connections A new request is sent to the server with the fewest current connections. The relative computing capacity of each server is factored into determining which has the least connections (so probably like a ratio)
Least Time Sends requests to server selected by a formula that combines fastest response time and fewest active connections
Hash* Distributes requests based on a key you define, such as the client IP address or the request url.