TLS termination is the process in which a load balancer, reverse proxy or gateway ends the encrypted TLS session from the client, decrypts the traffic and passes the plaintext or newly encrypted request to backend servers. The device that terminates the connection holds the server certificate and private key, performs the handshake and becomes the cryptographic endpoint that the client actually talks to. The older name SSL offloading comes from the era of Secure Sockets Layer, the predecessor of Transport Layer Security.
In load balancing, TLS termination is what makes content-aware routing possible. A Layer 7 load balancer cannot read HTTP headers, cookies or URL paths while they are encrypted, so it must terminate TLS before it can apply path rules, sticky sessions based on cookies or web application firewall checks. Terminating at the edge also centralizes certificate management and moves cryptographic work away from application servers.
How a terminating proxy handles a TLS connection
A terminating proxy completes the full TLS handshake on behalf of the backend, so the client never establishes a direct encrypted session with an application server. The client sends a ClientHello that usually contains the requested hostname in the Server Name Indication (SNI) extension. The proxy selects the matching certificate, negotiates the protocol version and cipher suite, and derives session keys through an ephemeral key exchange such as ECDHE.
Once the session is established, the proxy decrypts each record, parses the application protocol, applies routing and security policies and forwards the request to a chosen backend in a separate connection. Responses travel the reverse path and are re-encrypted toward the client. Because the proxy maintains two independent connections, it can reuse persistent backend connections, multiplex HTTP/2 or HTTP/3 streams and enforce timeouts on each side separately.
The table below lists the responsibilities that move to the terminating device.
| Function | What the proxy does | Why it matters |
|---|---|---|
| Handshake processing | Runs key exchange and authentication | Removes CPU-heavy work from backends |
| Certificate selection | Chooses a certificate by SNI hostname | Serves many domains from one address |
| Protocol negotiation | Agrees on TLS 1.2 or 1.3 and ALPN | Enables HTTP/2 and HTTP/3 at the edge |
| Session resumption | Issues session tickets or PSKs | Shortens repeat handshakes |
| Header injection | Adds X-Forwarded-For and X-Forwarded-Proto | Preserves client context for the backend |
Termination, passthrough and re-encryption patterns
Architects choose among three main deployment patterns, and the choice determines where traffic is visible in plaintext. In plain edge termination, the proxy decrypts and forwards unencrypted HTTP over the internal network. In TLS bridging, also called re-encryption, the proxy decrypts, inspects and then opens a fresh TLS connection to the backend. In TLS passthrough, the load balancer forwards encrypted bytes unchanged and the backend terminates TLS itself.
| Pattern | Plaintext visible at | Layer 7 routing | Typical use |
|---|---|---|---|
| Edge termination | Proxy and internal network | Yes | Trusted private networks, simple stacks |
| TLS bridging | Proxy only | Yes | Regulated data, zero trust networks |
| TLS passthrough | Backend only | No, only SNI-based routing | End-to-end encryption, client certificates at the app |
Passthrough is compatible only with Layer 4 load balancing or SNI inspection, because the proxy can read the hostname in the unencrypted ClientHello but nothing else. Algorithms such as least connections or IP hash still work, while cookie-based sticky sessions do not. With Encrypted Client Hello (ECH) gaining adoption, even SNI-based routing may require cooperation from the terminating party.
Performance and capacity considerations
The handshake is the expensive part of TLS; bulk encryption is comparatively cheap on modern processors. Asymmetric operations dominate new connections, while symmetric ciphers such as AES-GCM benefit from AES-NI hardware acceleration and ChaCha20-Poly1305 performs well on devices without it. Capacity planning therefore focuses on new handshakes per second rather than raw throughput.
| Setting | Effect | Typical recommendation |
|---|---|---|
| Key type | ECDSA P-256 signs faster than RSA 2048 | Prefer ECDSA, keep RSA for legacy clients |
| TLS version | TLS 1.3 needs one round trip for a full handshake | Enable TLS 1.3, keep TLS 1.2 as fallback |
| Session resumption | Skips most asymmetric work on reconnect | Enable tickets with regular key rotation |
| 0-RTT early data | Removes a round trip but allows replay | Limit to idempotent requests or disable |
| OCSP stapling | Saves clients a revocation lookup | Enable when the CA supports it |
Dedicated hardware accelerators were once common in SSL offloading appliances. Today, general-purpose CPUs handle most workloads, and software proxies such as HAProxy, NGINX or Envoy terminate tens of thousands of handshakes per second per server, depending on key type, core count and resumption rate.
Security trade-offs of terminating at the edge
Terminating TLS concentrates both control and risk in one tier. On the positive side, the security team can enforce a single minimum protocol version, disable weak cipher suites everywhere at once, rotate certificates automatically with ACME and place a web application firewall where it can see decrypted requests. Backends no longer need private keys, which reduces the number of places where a key can leak.
On the negative side, the terminating proxy becomes a high-value target holding many private keys, and any traffic forwarded in plaintext is exposed to anyone who can observe the internal network. Compliance frameworks such as PCI DSS and zero trust architectures increasingly expect encryption on every hop, which pushes deployments toward TLS bridging or mutual TLS between proxy and backend. Keys should be stored with restricted permissions, ideally in a hardware security module or a managed key service.
Common configuration mistakes
Most production incidents involving TLS termination come from lost context or incomplete chains rather than broken cryptography. The table below pairs typical symptoms with their causes and fixes.
| Symptom | Likely cause | Fix |
|---|---|---|
| Redirect loop between HTTP and HTTPS | Backend thinks the request arrived over HTTP | Honor X-Forwarded-Proto in the application |
| All clients appear to share one IP address | Client address replaced by the proxy | Read X-Forwarded-For or use PROXY protocol |
| Some mobile clients fail to connect | Missing intermediate certificate | Serve the full certificate chain |
| Certificate expires without warning | Manual renewal on several proxies | Automate issuance and monitor expiry |
| Wrong certificate for a hostname | SNI mapping missing or default used | Map every hostname explicitly |
A further subtle mistake is trusting forwarded headers from any source. Backends should accept X-Forwarded-For only from the known proxy addresses; otherwise a client can forge its apparent IP address and bypass access controls or rate limits.
The short version
Think of a large office building with a front desk that opens all incoming sealed mail. The front desk checks each letter, sees which department it belongs to and walks it to the right floor. The departments never have to open envelopes themselves, and only the front desk keeps the letter opener.
TLS termination works the same way for websites. Encrypted traffic arrives at the load balancer, which unlocks it, reads where it should go and passes it to the right server. This saves the servers work and keeps the keys in one place, but it also means the front desk must be very well protected.
Where it makes a difference
An online retailer runs twelve application servers behind a pair of Layer 7 load balancers. Before the redesign, each server held its own certificate, and renewals were handled by hand, which caused two expired-certificate outages in one year. The team moved termination to the load balancers, issued ECDSA certificates through ACME automation and enabled TLS 1.3 with session resumption.
Because the load balancers could now read URL paths, the team routed /api/ traffic to a dedicated server pool and attached a web application firewall to checkout requests. Payment card rules required encryption inside the data center, so the load balancers re-encrypt traffic to the checkout pool using an internal certificate authority. The result was automated renewals with no further outages, lower CPU usage on application servers and a single place to retire TLS 1.0 and 1.1.