Load Balancing
Load balancing distributes incoming network traffic across several servers or service instances, using health checks and routing algorithms so that applications stay responsive and available when individual instances fail.
Load balancing is the distribution of incoming network traffic across multiple servers, containers or other targets so that no single resource is overloaded. A load balancer receives requests on a single address and forwards each one to a healthy target using an algorithm such as round robin, least connections or hashing on client attributes. Health checks remove failed targets from rotation automatically. Layer 4 load balancers route on IP addresses and ports, while layer 7 load balancers inspect HTTP requests and can route by host name, path or header.
Load balancing underpins high availability and horizontal scaling for websites, APIs and internal services. Cloud providers offer managed options such as AWS Elastic Load Balancing, Azure Load Balancer and Azure Application Gateway, and Google Cloud Load Balancing. Software such as NGINX and HAProxy is widely used on-premise and inside Kubernetes ingress controllers. Global load balancing extends the idea across regions using DNS or anycast.
Design choices include session persistence for stateful applications, TLS termination at the load balancer or end-to-end encryption, connection draining during deployments and placement across availability zones. The load balancer itself must be redundant. Key metrics are request rate, latency, error responses and the number of healthy targets.
Key points
- Spreads requests across healthy targets using algorithms such as round robin or least connections
- Layer 4 balancers route by IP and port; layer 7 balancers route by HTTP attributes
- Health checks automatically remove failed targets from service
- Placing targets across availability zones improves resilience
Where AiVibe comes in
AiVibe Software Services delivers cloud solutions on AWS, Microsoft Azure, Google Cloud or on-premise, together with cloud security, legacy modernisation, data analytics and AI and machine learning services.
Related terms
- Auto ScalingCloud & AI Infrastructure
- High Availability (HA)Cloud & AI Infrastructure
- Availability Zone (AZ)Cloud & AI Infrastructure
- API GatewayCloud & AI Infrastructure
- Content Delivery Network (CDN)Cloud & AI Infrastructure
- KubernetesCloud & AI Infrastructure