What is the primary cost associated with not reusing HTTP connections across requests?

Test your Systems Design Concepts knowledge with our comprehensive quiz. Utilize flashcards and multiple choice questions to enhance your study session. Prepare thoroughly with detailed explanations for each answer and ace your examination!

Multiple Choice

What is the primary cost associated with not reusing HTTP connections across requests?

Explanation:
When you don’t reuse HTTP connections, you pay the cost of establishing a new transport channel for each request. The main expense is the TCP handshake that starts a new connection: a three‑way exchange where the client and server agree to talk, which requires at least one round-trip time (RTT) before any HTTP data can be sent. That handshake adds latency for every request, and it also uses extra resources on both sides. If you reuse connections (keep-alive or HTTP/2 multiplexing), that handshake is largely paid once and reused for subsequent requests, so the per-request latency drops dramatically. DNS lookups and TLS-related steps can contribute to startup cost as well, but they’re not the primary driver in this scenario, and TLS can still occur over new connections via session resumption, so the idea that you can’t use TLS isn’t correct.

When you don’t reuse HTTP connections, you pay the cost of establishing a new transport channel for each request. The main expense is the TCP handshake that starts a new connection: a three‑way exchange where the client and server agree to talk, which requires at least one round-trip time (RTT) before any HTTP data can be sent. That handshake adds latency for every request, and it also uses extra resources on both sides. If you reuse connections (keep-alive or HTTP/2 multiplexing), that handshake is largely paid once and reused for subsequent requests, so the per-request latency drops dramatically. DNS lookups and TLS-related steps can contribute to startup cost as well, but they’re not the primary driver in this scenario, and TLS can still occur over new connections via session resumption, so the idea that you can’t use TLS isn’t correct.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy