SSL/TLS Termination
You'll learn how API gateways handle HTTPS encryption at the perimeter to simplify backend services and centralize certificate management.
What is SSL/TLS Termination?
SSL/TLS termination means the API gateway accepts encrypted HTTPS traffic from clients, decrypts it, and forwards the request to backend services over unencrypted HTTP (or re-encrypts with a different certificate). The gateway "terminates" the secure connection at the edge of your system.
Think of it like a secure mail room: letters arrive in locked envelopes (HTTPS), the mail room staff opens them (decryption), then distributes the contents internally via regular interoffice mail (HTTP). The internal staff never needs keys to the locked envelopes.
Why Offload SSL/TLS to the Gateway?
Certificate management simplicity: Instead of distributing SSL certificates to dozens of microservices, you manage them in one place—the gateway. Renewal, rotation, and monitoring become centralized operations.
Performance benefits: Encryption/decryption is CPU-intensive. The gateway handles this once per request, rather than forcing every backend service to perform cryptographic operations. Services can focus on business logic.
Consistent security policies: The gateway enforces TLS versions (e.g., requiring TLS 1.2+), cipher suites, and certificate validation uniformly across all traffic.
Simplified service code: Backend services don't need SSL libraries or certificate configuration. They accept plain HTTP on private networks, trusting that the gateway has already authenticated the client.
Security Consideration
Terminating SSL means traffic between the gateway and services is unencrypted within your network. This is acceptable in trusted private networks but requires network-level security (VPCs, firewalls). Some organizations require re-encryption to backend services for defense-in-depth.
Key Takeaway: SSL/TLS termination at the API gateway centralizes certificate management, offloads cryptographic overhead, and simplifies backend services by handling encryption at the system's edge.