Layer 4 load balancers
Similar, to layer 7 load balancers, a layer 4 load balancer is also a traffic controller for a network, but with a number of differences compared to a layer 7 load balancer.
The layer 7 load balancer understands the content of incoming requests, making decisions based on specific information like web pages or data being requested. A layer 4 load balancer works at a lower level, looking at the basic information contained in the incoming network traffic, such as IP addresses and ports, without inspecting the actual data.
When you access a website or use an app, your device sends a request to the server with a unique IP address and a specific port number – also called a socket. The layer 4 load balancer observes this address and port to efficiently distribute incoming traffic across multiple servers. To help visualize how layer 4 load balancers work, think of it as a traffic cop that efficiently directs incoming cars to different lanes on a highway...