Estimate the end-to-end latency of a user request from New York to a server in London, where the request must read from a database once.
Ground numbers
Use these as your baseline (realistic order-of-magnitude values):
- Speed of light in fiber: ~200 km/ms
- New York to London: ~5,500 km → ~28 ms one way, ~56 ms round-trip minimum
- TLS handshake: 1-2 round-trips → adds ~56-112 ms on top of the base RTT
- Cross-AZ database round-trip within a region: ~1-2 ms
- A cache hit in the same data center: ~0.1-0.5 ms
- CDN cache hit at the edge: ~1-5 ms
Questions
- If the TLS handshake costs one full round-trip and the HTTP request is another round-trip, and the database round-trip adds 1 ms, what is the minimum latency from browser click to response? Which hop dominates?
- If you could eliminate the database round-trip by caching, how much would you save as a fraction of the total?
- If you could move the server to a CDN edge location in London, reducing the client-to-server distance but not the database distance, how does that change the answer?
The point of this exercise is not precision — it is recognizing which hop is the bottleneck and designing around it. Read the latency and throughput primer and the browser request flow to check your reasoning.