Notes

Notes and References

View the Project on GitHub leabstrait/notes

Layer 4 Vs Layer 7 Load Balancing

Layer 4 Load Balancer:

A Layer 4 Load Balancer operates at the transport layer (TCP/UDP) and focuses on distributing network traffic based on IP addresses and port numbers. It doesn’t inspect the actual content of the data being transmitted. When a client connects to a Layer 4 Load Balancer, it selects a backend server based on a predefined algorithm (round-robin, least connections, etc.). Once a backend server is chosen, all segments of data from that connection are directed to that specific server.

Pros:

Cons:

Layer 7 Load Balancer:

A Layer 7 Load Balancer operates at the application layer and is capable of inspecting the actual content of the data being transmitted. It can make routing decisions based on various factors like URL paths, headers, cookies, and more. When a client connects to a Layer 7 Load Balancer, it not only selects a backend server but also parses and understands the content of the request to make informed routing decisions.

Pros:

Cons: