TCP Protocol
The Transmission Control Protocol (TCP) is a foundational element in networking. TCP ensures reliable, ordered, and error-checked delivery of data between servers and clients, forming a key part of the TCP/IP suite.
Network Models: TCP/IP vs. OSI
Understanding network communication begins with layered models. Two of the most common models include:- TCP/IP Model: Consists of four layers—Application, Transport, Network, and Network Interface.
- OSI Model: Divides communication into seven layers—Application, Presentation, Session, Transport, Network, Data Link, and Physical.
- HTTP functions at the Application layer.
- Ethernet operates at the Network Interface (or Data Link) layer.
- TCP works at the Transport layer.

Load Balancing Protocol Options
When setting up a load balancer, you have three primary protocol options to choose from:- HTTP: Ideal for static websites serving simple content.
- TCP: Suitable for services requiring reliable transport, such as streaming platforms.
- UDP: Often used for streaming and applications where speed is critical over reliability.
Health Checks
Health checks ensure the backend services behind a load balancer are operational and ready to handle traffic. They continuously monitor the status of instance groups and help direct traffic to healthy nodes.Health checks are integral in minimizing downtime by automatically rerouting traffic when an instance group fails the health check, thereby maintaining continuous service.

Example Scenario
Imagine a setup where two instance groups host a website through a load balancer. Health checks monitor these instance groups; if one group encounters an issue (such as returning a “no upstream” error), the load balancer automatically directs traffic to the operational group. This ensures that users continue to access the website seamlessly despite underlying failures.
Core Concepts of Load Balancing
Load balancers distribute incoming user traffic across multiple servers or groups to achieve several benefits:- Reducing load on individual servers
- Enhancing overall performance and reliability
- Dynamically routing traffic to healthy instances to mitigate failures
- Layer 4: Handles TCP and UDP traffic.
- Layer 7: Manages application-level traffic, such as HTTPS.
