What Is Latency? Why Distance Makes Your App Feel Slow
Latency is the delay before data arrives; bandwidth is how much can arrive at once. What latency is, why physical distance sets a floor on it, why round trips multiply it, latency vs bandwidth vs throughput, and practical ways to make an app feel faster for faraway users.
Your app feels instant when you test it, but users on another continent say it's sluggish. Your code is the same; the difference is latency — the time it takes data to travel between them and your server.
The short version
Latency is delay: how long it takes for a request to reach the server and the response to come back. It's usually measured in milliseconds (ms) as round-trip time — what ping shows you.
Latency vs bandwidth vs throughput
These get mixed up constantly:
- Latency: how long one piece of data takes to arrive. The length of the road.
- Bandwidth: how much data can move at once. The number of lanes.
- Throughput: how much actually gets through in practice. The traffic that really flows.
A fast "1 Gbps" connection is about bandwidth. It doesn't make a server on the other side of the world any closer. For loading web pages and using apps — lots of small requests — latency usually matters more than bandwidth.
Why distance matters: physics
Data travels through fibre-optic cables at roughly two-thirds the speed of light — about 200 km per millisecond. Cables don't run in straight lines, and every router along the way adds a little. Rough real-world round trips:
| Between | Typical round trip |
|---|---|
| Same city / same data centre | under 1–5 ms |
| Within Europe or within the US | about 10–40 ms |
| US East Coast ↔ Western Europe | about 70–100 ms |
| Europe ↔ US West Coast | about 140–180 ms |
| Europe ↔ Australia | about 250–300 ms |
No amount of optimisation beats the speed of light. If your server is in Germany and your user is in Sydney, every round trip costs a quarter of a second.
Why round trips multiply
One page load isn't one round trip. It might involve:
- a DNS lookup,
- a TCP connection,
- a TLS (HTTPS) handshake,
- the HTML request,
- requests for CSS, JavaScript and images,
- API calls made by the JavaScript — sometimes one after another.
Ten sequential round trips at 250 ms is 2.5 seconds of pure waiting, before your server has done any work. That's why a page can feel slow even when the server is fast.
Latency inside your app
The same principle applies within your own system:
- App ↔ database. If your app server is in one region and your database in another, every query pays that latency. A page making 30 queries at 20 ms each spends 600 ms just waiting. Keep the app and database together — ideally on the same machine or in the same data centre. (The N+1 query problem makes this much worse.)
- App ↔ third-party APIs. Each external call adds its own round trip.
How to reduce latency's impact
- Put servers near most of your users. If most users are in Europe, host in Europe.
- Keep the app and database close together.
- Use a CDN for static files — images, CSS, JavaScript — so they're served from a location near each user. (What is a CDN?)
- Cut round trips. Combine API calls, avoid request "waterfalls" where one call waits for another, fetch data on the server instead of in several browser requests.
- Cache. The fastest request is one you don't make. (What is caching?)
- Reuse connections. HTTP/2 and HTTP/3 and keep-alive connections avoid repeated handshakes.
- Make the app feel fast: show content progressively, give instant feedback on clicks, and use optimistic updates.
Measuring it
ping example.comshows round-trip time to a server.- The browser's Network tab shows each request's timing, including waiting time ("time to first byte"). (Browser developer tools for beginners.)
- Online tools test your site from many locations at once.
Latency for developers, too
Latency affects you when you work on a remote machine: typing into a terminal on a server 150 ms away feels laggy. Tools like mosh help, and so does choosing a server region close to you.
The summary
- Latency is delay; bandwidth is capacity. Apps usually feel latency more.
- Distance sets a hard minimum: roughly 10–40 ms within a continent, 70–300 ms between continents.
- Page loads involve many round trips, so latency multiplies.
- Host near your users, keep app and database together, use a CDN, cut and cache requests.
EasySpawn runs your app and its database on the same server, so queries don't cross a network at all. Servers are hosted in the EU (Germany and Finland) — ideal for European users; if most of your users are far from Europe, expect some added latency and pair it with a CDN. See pricing or join the waitlist.
Related: Why Is My Website Slow? · Core Web Vitals Explained · What Is a Server? · What Is the Cloud? · HTTP/1.1 vs HTTP/2 vs HTTP/3
Keep reading
What Is a Load Balancer? Spreading Traffic Across Servers
A load balancer sits in front of several copies of your app and spreads requests between them, skipping any that are unhealthy. How it works, the common algorithms, sticky sessions, health checks, and why a small app probably doesn't need one yet.
Horizontal vs Vertical Scaling: How Apps Handle More Users
Vertical scaling means a bigger server; horizontal scaling means more servers. How each works, what load balancers do, why databases are the hard part, what has to change in your app to scale out, and why most small apps should scale up first.