Skip to content
Hosting2 min read

What is latency?

Short answer

Latency is the delay between sending a request and receiving the first byte of the reply, measured in milliseconds (ms). The biggest factors are the distance between visitor and server and how many round trips happen before the page starts to appear.

ArabyHost teamLast updated: ShareWhatsAppXLinkedIn
Contents
  1. Latency is not the same as speed
  2. Why it multiplies
  3. Practical example: measure it yourself
  4. Ways to reduce latency
  5. On ArabyHost

Latency is usually measured as round-trip time (RTT). Light in optical fibre covers roughly 200,000 km per second, so every 1,000 km of distance adds about 10 ms to a round trip, before routing and congestion are counted.

Latency is not the same as speed

Term Meaning Analogy
Latency Delay before the first data arrives Length of the road
Bandwidth Data per second Number of lanes
TTFB Time until the first byte of the page The road plus preparing the order

Why it multiplies

Loading a page for the first time is never a single trip. There’s a DNS lookup, a TCP handshake, a TLS handshake, and then the request itself. With a high RTT, each of those trips adds the same delay again. That’s why HTTP/3 and TLS 1.3 help: they cut the number of round trips before the page arrives.

Practical example: measure it yourself

ping -c 4 example.com
curl -o /dev/null -s -w "dns=%{time_namelookup} connect=%{time_connect} tls=%{time_appconnect} ttfb=%{time_starttransfer}\n" https://example.com

ping reports the RTT directly. The curl command breaks the time into stages, in seconds: a large connect usually points to distance or the network, while a big gap between tls and ttfb means the server or application is slow to build the page.

Ways to reduce latency

  • Pick a data center close to most of your visitors.
  • Use a CDN to serve images, CSS and JS from points near the visitor.
  • Load fewer third-party domains; each new one needs a DNS lookup and a fresh connection.
  • Turn on caching so server-side page generation doesn’t add time on top of the network.

On ArabyHost

Our servers are in a data center in Germany, which is geographically closer to most Arab countries than US data centers and well placed for visitors in Europe, North Africa and the Levant. For visitors further away, such as in the Gulf, you can put a CDN in front of the site to speed up static files; see using Cloudflare with your hosting. For WordPress sites, LiteSpeed with the LiteSpeed Cache plugin keeps the server’s own page-building time short.

FAQ

What's the difference between latency and ping?

Ping is a tool that sends a tiny packet and times its round trip, giving a rough latency figure. Some servers block ping, so timing a real request with curl is more accurate for a website.

Does a CDN fix latency completely?

It fixes it for static files and cached pages. Dynamic requests such as the cart or login still travel to the origin server, so its location still matters.

Does more bandwidth reduce latency?

Not directly. Bandwidth is how much data moves per second; latency is set by distance and the number of round trips. A very fast connection to a distant server still has delay.

Useful? Share it with someone who needs it:WhatsAppXLinkedIn

Read next

Ready to put your idea online?

Fast, isolated hosting, support that understands you, and an AI assistant that fixes problems with you.