Blog

Networking articles

Latency vs Bandwidth: Why Your Website Feels Slow

Latency vs bandwidth explained: why a faster plan does not always speed up websites, how round trips add up, and how to measure and reduce delay.

4 min read Networking

A business upgrades its internet plan from 100 Mbps to 1 Gbps, and the cloud application everyone complains about feels... exactly the same. That is not a fault in the new connection. It is the difference between latency vs bandwidth: two separate properties of a network, which affect performance in very different ways. For most websites and business apps, latency is the one that makes things feel slow.

Two different measurements

Bandwidth is capacity: how much data can be transferred per second, measured in megabits or gigabits per second (Mbps, Gbps). It is what internet plans advertise.

Latency is delay: how long it takes for a piece of data to get from one point to another, measured in milliseconds (ms). It is usually quoted as round-trip time (RTT), the time for a message to reach the other end and a reply to come back.

A road analogy helps. Bandwidth is the number of lanes on a motorway; latency is the length of the journey. Adding lanes lets more cars travel at once, but each car still takes just as long to reach its destination. If you need to make many short trips back and forth, the length of the road matters far more than its width.

A third term, throughput, is the data rate you actually achieve, which is often lower than the bandwidth because of latency, packet loss and protocol overheads.

Where latency comes from

  • Distance. Light in optical fibre travels at roughly two-thirds of its speed in a vacuum, about 200 km per millisecond. A 1,000 km fibre path adds about 5 ms each way before any equipment delay. Real cable routes are rarely straight, so intercontinental round trips commonly take well over 100 ms. No upgrade can beat physics.
  • Equipment and hops. Each router along the path adds a small processing and queuing delay.
  • The last mile. Wi-Fi, mobile networks and some broadband technologies add delay and variability (called jitter), especially when busy.
  • Congestion. When a link is saturated, packets wait in queues. A large upload or backup can make an office's latency spike for everyone, a problem known as bufferbloat.
  • Server processing. Not network latency strictly, but time spent generating a response adds to what users experience.

Why websites are so sensitive to latency

Loading a web page is not one big download. It is a sequence of small conversations, many of which must finish before the next can start. Before the first byte of a page arrives over a brand-new connection, the browser typically needs:

  1. A DNS lookup to find the server's address (one round trip to the resolver, possibly more).
  2. A TCP handshake to open the connection (one round trip).
  3. A TLS handshake to set up encryption (one round trip with TLS 1.3, two with TLS 1.2).
  4. The HTTP request itself (one round trip, plus server processing time).

With a 150 ms round-trip time, that is roughly 600 ms or more before the HTML even starts arriving, and the page then discovers stylesheets, scripts and images that may trigger more requests. Bandwidth barely features: the HTML may be only tens of kilobytes. This is why a site can feel sluggish on a gigabit connection and why mobile users on high-latency networks feel the pain most.

Latency also caps bandwidth in practice. TCP increases its sending rate gradually, waiting for acknowledgements each round trip, so on a long-distance connection it takes longer to reach full speed, and a single transfer may never use all the available bandwidth.

When bandwidth is the bottleneck

Bandwidth does matter for large transfers: video streaming and conferencing with many participants, cloud backups, large file uploads, and offices where many people share one connection. If the connection is regularly saturated, everyone's latency rises too, because packets queue up. In that case, more bandwidth or traffic prioritization (quality of service) genuinely helps.

How to measure each

Latency:

ping example.com

The time= values show round-trip time in milliseconds. To see where delay builds up along the path, use tracert example.com on Windows or traceroute example.com (or mtr) on Linux and macOS. Some servers block ping, so a timeout does not necessarily mean the server is down.

For a website, curl can break down the timing of each phase:

curl -o /dev/null -s -w "dns: %{time_namelookup}s\nconnect: %{time_connect}s\ntls: %{time_appconnect}s\nfirst byte: %{time_starttransfer}s\ntotal: %{time_total}s\n" https://example.com

If "first byte" is much larger than "tls", the server is spending time generating the page. If connect and TLS are large, distance or the network is the issue.

Bandwidth: use a speed test, ideally measuring "loaded latency" as well, which shows how much latency increases while the connection is busy.

How to reduce latency's impact

  • Serve content closer to users. A CDN caches static assets, and sometimes whole pages, at edge locations near visitors. Hosting the origin in a region close to most of your customers helps dynamic pages.
  • Cut round trips. Enable TLS 1.3 and HTTP/2 or HTTP/3 on the server, reuse connections with keep-alive, and reduce the number of separate domains a page loads from.
  • Cache aggressively. Correct Cache-Control headers let returning visitors skip requests entirely. Check yours with an HTTP header checker.
  • Reduce dependencies. Every third-party script can add DNS lookups and connections. Remove those that do not earn their place.
  • Speed up the server. Slow database queries and unoptimized code add directly to time to first byte; this is often a database tuning job.
  • Fix office congestion. Schedule backups outside working hours and enable QoS or smart queue management on the router.

Key takeaways

  • Bandwidth is how much data per second; latency is how long each trip takes.
  • Web pages involve many sequential round trips, so latency usually dominates how fast they feel.
  • Distance sets a hard floor on latency; bring content closer with hosting choices and CDNs.
  • Measure both: ping and curl timings for latency, speed tests for bandwidth.

Need help with this?

Netifi helps businesses around the world with Networking. Tell us what you are working on.