Home/Reference Architecture/Application delivery
Layer 05 — Application deliveryHow traffic is selected, secured and balanced.
The load balancer is the one device in the path that changes the traffic rather than simply forwarding it. It terminates the session, rewrites the addresses, chooses the destination and decides what counts as healthy — and every one of those is a design decision somebody made years ago and nobody has revisited.
This environment is invented. It was built for these pages and does not describe any client, employer or real estate. Work produced under an engagement belongs to the client who commissioned it and is not republished in any form, redacted or otherwise. This environment is designed to contain the decisions worth discussing, which no single real estate ever does.
Watch it build 5 steps, then it loops.
How this layer is put together.
Each step adds one part of the design. The last one is usually where the trouble lives.
- 01A client reaches the virtual server through the firewall, which writes its policy against the client address it can see.
- 02TLS terminates at the load balancer — and for one of the three applications, terminates again behind it, so inspection and the application are looking at different sessions.
- 03Source translation replaces the client address toward the backend, so everything downstream sees the load balancer instead of the user.
- 04Persistence keeps a given user on a given member, which is invisible when it works and unmistakable when it stops.
- 05And health monitors decide which members are eligible — usually by checking a port, which answers long after the application behind it has stopped working.
Every one of these is a reasonable setting. Together they mean the firewall, the load balancer, the application and the monitoring system are each describing a different conversation, and no two of them can be compared directly.
6 choices, and what each one costs later.
None of these is a mistake. Each is a defensible trade made with the information available at the time. What they have in common is that the cost arrives somewhere other than where the decision was made — which is why it lands on somebody who was not in the room.
Source translation, or preserving the client
The decision. The load balancer replaces the client address toward the backend.
Why it gets made. It guarantees the return traffic comes back through the load balancer without asymmetric routing, which is otherwise a substantial routing problem.
What it costs when it is wrong. Client identity disappears at that point. Firewall policy written for user ranges no longer matches, backend logs record the load balancer for every request, and any investigation that depends on knowing who did something has to be reconstructed from a second source.
Where TLS terminates
The decision. TLS terminates at the load balancer, and for one application is re-established to the backend.
Why it gets made. Termination is required for inspection, for cookie persistence and for offloading work from the application. Re-encrypting behind it satisfies a compliance requirement.
What it costs when it is wrong. There are now two certificate chains, two renewal cycles and two cipher configurations for one application, maintained by two teams. Inspection examines a session the application never sees, and a mismatch between the two presents as an intermittent application error.
How persistence is maintained
The decision. Persistence is held by a cookie inserted at the load balancer.
Why it gets made. It survives client-side address changes and is far more precise than source-address persistence, especially behind NAT.
What it costs when it is wrong. It is an object that has to exist identically on the standby unit, and it is exactly the kind of object a configuration sync reports as fine while not having it. Failover then succeeds and every user is returned to a login page.
What a health monitor actually checks
The decision. Members are monitored by a TCP connection to the service port.
Why it gets made. It is cheap, it is universal, it works against anything, and it needs no cooperation from the application team.
What it costs when it is wrong. A port answers for as long as the process is running, which is considerably longer than the application is useful. The pool stays green through a database outage, a full disk or an application returning errors to every request, and the load balancer keeps distributing traffic into it.
Whether the standby holds the same objects
The decision. The pair is synchronized, and the sync reports success.
Why it gets made. That is the mechanism provided for exactly this purpose, and there is no reason to distrust it.
What it costs when it is wrong. Profiles, monitors, rules and certificates created outside the synchronized scope do not travel. Traffic is served after failover, which is what gets tested; state is not preserved, which is what users notice.
Whether name resolution is part of the path
The decision. Global load balancing directs users to a site before any of the above applies.
Why it gets made. It is the only mechanism that can move users between data centers without renumbering anything.
What it costs when it is wrong. Its behavior during failover is governed by record lifetimes and by resolvers that ignore them. A site can be declared down and continue receiving traffic for as long as somebody's resolver holds the previous answer, which no failover test measures because the test uses fresh lookups.
The layers connect. That is the point.
Each layer is drawn on the same estate, so a decision taken here shows up as a constraint somewhere else. Reading two of them together is usually more informative than reading either one twice.
Recognize your own estate in this?
Most environments contain several of these decisions. Establishing which ones, and what they are costing, is what an assessment is for.