Load Balancing
Load balancing distributes requests across multiple destinations according to configured rules. It can help use capacity and route around unhealthy servers. The balancing layer may operate within one location or across locations. Its effectiveness depends on the application, health checks, available capacity, and dependencies shared by the destinations.
A successful health check must mean something
Suppose a tracking service has two application servers. A check that merely confirms a TCP connection can pass while both servers fail to write click records. A more relevant check may need to establish readiness for the request path being protected, without itself creating production customer activity.
Choose failure thresholds and recovery behavior deliberately. Switching traffic after one slow response can create instability; waiting too long can continue routing users to a broken destination. Test the application’s actual behavior and the consequences of those choices.
Preserve the state the request needs
A user can reach server A on one request and server B on the next. Session state and required records must remain available under the chosen architecture. Sticky routing can be useful in some designs, but it should not conceal an unexplained dependency on a single server.
For referral tracking, preserve query parameters, click identifiers, and the intended redirect behavior. When retrying or failing over data-changing requests, prevent duplicate effects. Routing the same conversion to another server after a timeout must not generate a second payable event.
Test the remaining failure points
Two application servers may still depend on one database, queue, DNS configuration, or regional service. A load balancer does not remove those shared dependencies. Confirm spare capacity when a destination is unavailable and review what happens during a traffic spike and a simultaneous failure.
Monitor destination health, response time, errors, and the user’s end-to-end outcome. CDNs can add geographic routing, while availability agreements define a different commercial layer. Operational evidence helps reconstruct failures. The useful result is continued correct service under a tested scenario, rather than simply a diagram containing more than one server.
Source: Cloudflare: load-balancing concepts.