DEV Community

SHARON SHAJI
SHARON SHAJI

Posted on

πŸ” TLS Termination Models - SSL Passthrough vs SSL Termination (Offloading) vs SSL Bridging (Re-Encryption)

Why They Exist, Why They’re Used, and When Each Matters

TLS is not just β€œturning on HTTPS.”

Where TLS is terminated defines:

  • πŸ‘οΈ Who can see the traffic
  • πŸ›‘οΈ What security controls are possible
  • πŸ“ˆ How scalable your system is
  • πŸ“‹ Whether auditors will sign off

That’s why multiple TLS termination models exist.


🌐 Why TLS Termination Models Exist

Because no single model can optimize all of these at once:

  • πŸ” Security
  • βš™οΈ Operability
  • πŸ“ˆ Scalability
  • πŸ” Traffic visibility
  • πŸ’° Cost efficiency

Each TLS termination model trades one dimension for another.

Understanding these trade-offs prevents:

  • Over-engineered designs
  • Weak security assumptions
  • β€œBest-practice” architectures that fail in production

1️⃣ SSL Passthrough (End-to-End TLS)

The proxy or load balancer does NOT decrypt TLS.

Encrypted traffic is forwarded directly to the backend.

Architecture Diagram

  Client
    |
    | HTTPS (TLS)
    v
Load Balancer (Layer 4 – no decryption)
    |
    | HTTPS (TLS)
    v
Backend Application (TLS terminates here)

Enter fullscreen mode Exit fullscreen mode

🎯 Why It Exists

  • Maintain true end-to-end encryption
  • Enforce zero-trust networking
  • Keep TLS fully owned by the application

πŸ§ͺ Examples

  • gRPC services with mTLS
  • Banking and healthcare backends
  • Kubernetes Ingress with SSL Passthrough enabled

βœ… Why It Matters

  • No intermediate system can inspect or modify traffic
  • Required for strict compliance environments

⚠️ Trade-offs

  • ❌ No path-based routing
  • ❌ No WAF, authentication, or rate limiting
  • ❌ Certificate management per backend

Best when: Security > operability

Avoid when: Traffic inspection is required


2️⃣ SSL Termination / SSL Offloading (Most Common)

TLS is terminated at the proxy or load balancer.

Backend traffic becomes plain HTTP.

Architecture Diagram

    Client
      |
      | HTTPS
      v
Load Balancer / Reverse Proxy (TLS ends here)
      |
      | HTTP
      v
Backend Application
Enter fullscreen mode Exit fullscreen mode

🎯 Why It Exists

  • Centralized certificate management
  • Simplified backend services
  • Enables Layer-7 traffic handling

πŸ§ͺ Examples

  • AWS ALB / ELB
  • Nginx Ingress Controller
  • HAProxy, Envoy

βœ… Why It Matters

TLS must be decrypted to enable:

  • Path-based routing (/api, /auth)
  • WAF and rate limiting
  • Authentication and observability

⚠️ Trade-offs

  • ❌ Backend traffic is unencrypted
  • ❌ Internal network must be trusted

πŸ’‘ This model powers most production SaaS platforms today.


3️⃣ SSL Bridging / Re-Encryption (Best of Both, Costs More)

TLS terminates at the proxy, and a new TLS session is created to the backend.

Architecture Diagram

    Client
      |
      | HTTPS
      v
Proxy / Load Balancer (TLS #1 terminates)
      |
      | HTTPS (TLS #2 starts)
      v
Backend Application\
Enter fullscreen mode Exit fullscreen mode

πŸ”‘ Key Characteristics

  • Two TLS sessions
  • Proxy can inspect traffic
  • Backend still receives encrypted traffic

βœ… Pros

  • End-to-end encryption preserved
  • Full Layer-7 features at the proxy
  • Strong compliance posture

❌ Cons

  • Extra CPU overhead (double TLS)
  • Certificates required at both proxy and backend
  • Harder debugging and troubleshooting

🧭 When to Use

  • Regulated environments (PCI-DSS, HIPAA)
  • Kubernetes ingress with security mandates
  • Zero-trust internal networks

❌ Common Misconceptions

SSL termination is insecure.

  • False, if the internal network is controlled.

SSL passthrough is always better.

  • False, if routing or inspection is required.

SSL bridging is free security.

  • False β€” it costs CPU, latency, and operational effort.

🧭 Practical Recommendation (No BS)

  • Simple public apps / Maximum simplicity β†’ SSL Termination
  • Compliance-heavy systems / Security + control β†’ SSL Bridging
  • Strict zero-trust / mTLS / Maximum secrecy β†’ SSL Passthrough

If you can’t clearly explain why you chose one,

you probably chose the wrong model.


πŸ“Š Comparison Table

Feature SSL Passthrough SSL Termination SSL Bridging
TLS decrypted at proxy ❌ βœ… βœ…
Backend traffic encrypted βœ… ❌ βœ…
HTTP routing / WAF ❌ βœ… βœ…
Certificate management Backend Centralized Both
Operational complexity High Low High
Security level πŸ”’πŸ”’πŸ”’ πŸ”’πŸ”’ πŸ”’πŸ”’πŸ”’

🧠 Final Takeaway

SSL/TLS termination models exist because:

Security, visibility, scalability, and cost cannot all be optimized at once.

There is no universal best practice β€”

only context-correct architectural decisions.

Top comments (0)