Load balancers are critical infrastructure components that prevent server overload, eliminate single points of failure, and enable horizontal scaling.
Why it matters
- Ensures application availability even when individual servers fail.
- Enables horizontal scaling by adding servers behind the load balancer.
- Improves response times by routing requests to the least-busy server.
- Required for high-availability architectures and disaster recovery.
- Essential for meeting SLA commitments for uptime and performance.
Load balancing algorithms
- Round Robin: Distributes requests sequentially across servers.
- Least Connections: Routes to the server with fewest active connections.
- Weighted: Assigns proportional traffic based on server capacity.
- IP Hash: Routes requests from the same client IP to the same server (session persistence).
- Least Response Time: Chooses the server with fastest response and fewest connections.
Types of load balancers
- Layer 4 (Transport): Routes based on IP address and TCP/UDP port; fast but less flexible.
- Layer 7 (Application): Routes based on HTTP content (URL, headers, cookies); more intelligent but higher overhead.
- Global (GSLB): Distributes traffic across geographically distributed data centers.
- Internal: Balances traffic between services within a private network.
Health checks
- Active checks: Load balancer periodically probes servers for availability.
- Passive checks: Monitors actual traffic for errors and response times.
- Graceful degradation: Remove unhealthy servers from rotation without dropping connections.
High availability patterns
- Active-Passive: Standby load balancer takes over if primary fails.
- Active-Active: Multiple load balancers share traffic with automatic failover.
- DNS failover: GSLB redirects traffic to healthy data centers.
Cloud implementations
- AWS: Application Load Balancer (ALB), Network Load Balancer (NLB), Classic Load Balancer.
- Azure: Azure Load Balancer, Application Gateway.
- GCP: Cloud Load Balancing (HTTP(S), TCP/UDP, Internal).
Related Tools
Related Articles
View all articlesHow to Recover an Accidentally Closed Claude Code Session
Closed your Claude Code terminal by accident? Your conversation isn't gone. Learn how to resume it with claude --continue and --resume, where transcripts are stored on disk, and how to reopen the closed terminal window itself on macOS and Windows.
Read article →Google Antigravity 2.0 Broke Your Setup? What Changed and How to Recover
Antigravity 2.0 auto-rolled out on May 19, 2026 and replaced many developers' working IDE with an agent-orchestration desktop app. Here's what actually changed and how to recover your projects, history, and editor.
Read article →How to Add an MCP Server to Any AI Coding CLI (Claude Code, Codex, Gemini, Qwen, Oh My Pi)
A practical, per-tool guide to wiring up Model Context Protocol servers across Claude Code, Codex CLI, Gemini CLI, Qwen Code, and Oh My Pi — including stdio vs HTTP transports, config file locations, scopes, secrets, and the field-name gotchas that trip everyone up.
Read article →CLAUDE.md vs AGENTS.md vs GEMINI.md: How Each CLI Reads Project Context
Claude Code, Codex CLI, and Gemini CLI each read a different project-context file. Here's how discovery, scope, and size limits actually work, and how to maintain one source of truth without file drift.
Read article →Explore More Cloud Infrastructure
View all termsAPI Gateway
A service that acts as a single entry point for API requests, handling routing, authentication, rate limiting, and other cross-cutting concerns.
Read more →AWS (Amazon Web Services)
Amazon's comprehensive cloud computing platform offering over 200 services for compute, storage, databases, networking, security, and application development.
Read more →Azure (Microsoft Azure)
Microsoft's cloud computing platform providing integrated services for compute, analytics, storage, networking, AI, and enterprise applications.
Read more →CDN (Content Delivery Network)
A geographically distributed network of servers that cache and deliver web content from locations closest to end users, improving performance and reliability.
Read more →Docker
A platform for developing, shipping, and running applications in lightweight, portable containers that package code with all its dependencies.
Read more →Kubernetes
An open-source container orchestration platform that automates deployment, scaling, and management of containerized applications across clusters of hosts.
Read more →