System Design
2. Networking FundamentalsAnimated
Network Latency
The delay for data to travel across a network.
The idea
Latency depends on distance (speed of light), routing hops and congestion. A round trip across an ocean costs around 100 ms or more.
Watch it work
Press play, pause, or step through. Some animations have settings you can change.
- client
- gateway / proxy
- service
- cache
- data store
- queue / stream
Users connect to the nearest edge location.
- step:
- 1/4
- at:
- User (EU)
1/9
The green dot is a request moving through the system.
Step by step
- 1Measure round-trip time
- 2Reduce distance with CDNs and regions
- 3Reduce round trips with keep-alive and batching
- 4Use protocols with fewer handshakes
Where it is used
Global apps.
Watch out for
You cannot beat physics. Cut the number of round trips instead.