SSL/TLS termination in AWS - Time & Space Complexity
When we use SSL/TLS termination in AWS, we want to know how the time to handle secure connections changes as more users connect.
We ask: How does the work grow when many secure requests come in?
Analyze the time complexity of the following operation sequence.
// Create a load balancer with SSL termination
aws elbv2 create-load-balancer --name my-lb --subnets subnet-123 subnet-456
// Create a listener with SSL certificate
aws elbv2 create-listener --load-balancer-arn arn:aws:lb --protocol HTTPS --port 443 --certificates CertificateArn=arn:aws:acm:cert/123
// Forward requests to target group
aws elbv2 create-target-group --name my-targets --protocol HTTP --port 80 --vpc-id vpc-789
This sequence sets up a load balancer that ends SSL connections and forwards plain HTTP to servers.
Identify the API calls, resource provisioning, data transfers that repeat.
- Primary operation: Handling each incoming HTTPS connection and decrypting SSL/TLS.
- How many times: Once per client connection request.
Each new secure connection requires the load balancer to perform SSL handshake and decryption work.
| Input Size (n) | Approx. Api Calls/Operations |
|---|---|
| 10 | 10 SSL handshakes and decryptions |
| 100 | 100 SSL handshakes and decryptions |
| 1000 | 1000 SSL handshakes and decryptions |
Pattern observation: The work grows directly with the number of connections.
Time Complexity: O(n)
This means the time to handle SSL termination grows linearly with the number of secure connections.
[X] Wrong: "SSL termination time stays the same no matter how many users connect."
[OK] Correct: Each new connection needs its own SSL handshake and decryption, so more users mean more work.
Understanding how SSL termination scales helps you design systems that handle secure traffic smoothly as user numbers grow.
"What if SSL termination was moved from the load balancer to each backend server? How would the time complexity change?"