A single entry point must survive application failure
Who receives the request
A reverse proxy accepts the client HTTP connection and forwards the request to a chosen upstream application. It hides internal addresses and provides a shared routing point. Here we study only available-upstream selection and the extra network hop. TLS termination, headers and proxy security are not simulated.
Why health checks are needed
A node may exist in the diagram yet not respond. A health check periodically tests availability. Until the proxy detects failure, some requests keep going to the broken upstream and are lost. Check frequency affects the loss window, but detection does not restore the failed application’s capacity.
How to calculate headroom
If one of three applications at 300 requests/s fails, only 600 remain. That is insufficient for the original 900, even with perfect routing. Four applications leave three healthy ones, giving 900 requests/s. A fifth adds headroom, but its cost may exceed the budget.
How this differs from load balancing
The transition over time matters: all applications work first, then the first fails, and later the proxy removes it from routes. Inspect losses on the failed upstream and detection delay separately. A short interval helps detection but cannot replace spare capacity.
Task
900 requests/s go to applications of 300 requests/s each. At 20 s the first upstream fails. Add a reverse proxy and spare capacity, then configure failure detection.
60 s; the first application stops responding at 20 s. Without a proxy all traffic targets it. The proxy distributes traffic across upstreams; until detection, its share is lost, then only healthy capacity remains. The first health check occurs at the failure second, so delay = interval − 1.
- Add a reverse proxy and the required number of applications.
- Set the health check interval.
- Test the solution over the full 60-second interval, including the failure.