After turning on TLS between internal services, p50 latency doubled.

IntermediateTroubleshootingLatency
Answer

Likely causes → Clients open a new connection per request, so every call now pays a full TCP plus TLS handshake (one or two extra round trips plus crypto). Missing session resumption makes it worse.

Diagnose →

ss -tan state time-wait | wc -l      # huge count = no connection reuse
curl -w 'tls:%{time_appconnect}\n' -o /dev/null -s https://orders.internal/health

Fix → Reuse connections: shared HTTP client with keep-alive and a pooled transport, HTTP/2 where possible, and TLS 1.3 (one-round-trip handshake).

Prevent → Create HTTP clients once per process (not per request), and monitor new connections per second per service.

All Real-World Interview questions Roadmap: Interview readiness

More on Latency