When an application feels slow, the first instinct is to ask for "more bandwidth". Yet in most modern workloads the problem is not a lack of bandwidth but an excess of latency: the time it takes a packet to travel to its destination and back. You can have a 10 Gbps link and still suffer a slow website, a crawling database or a choppy voice call, because those workloads depend on delay, not throughput.
Latency is usually measured as RTT (Round-Trip Time), the round-trip delay a simple ping returns. It matters because many protocols are conversational: a database query, an API call or setting up a TLS session require several round trips, and each one pays the full RTT toll. If the RTT is 5 ms, ten exchanges cost 50 ms; if it is 120 ms, those same ten exchanges cost 1.2 seconds. Bandwidth does not change that arithmetic.
In this article we break down what latency is made of, how it differs from bandwidth, jitter and packet loss, how to measure it correctly with the right tools and, above all, what real levers you have to reduce it — including why, for users in Spain, hosting in Spain is the most cost-effective performance decision you can make.
What Latency Is and Why It Matters More than Bandwidth
Latency is the delay a piece of data experiences travelling from one point of the network to another. Bandwidth measures how much data fits down the link per second; latency measures how long the first bit takes to arrive. They are orthogonal dimensions: widening the pipe does not shorten its length. The classic analogy is a motorway: adding lanes (bandwidth) lets more cars through at once, but it does not make a given car arrive sooner if the journey is long (latency).
There is a whole family of workloads whose performance is governed by latency rather than throughput:
- check_circle Databases and APIs: every query or call adds one or more round trips. A page that fires 40 chained queries multiplies the delay by 40.
- check_circle Trading and financial systems: a few milliseconds decide whether an order executes before or after a competitor's.
- check_circle VoIP and video calls: above about 150 ms of mouth-to-ear delay conversation becomes awkward; added jitter cuts the audio.
- check_circle Online gaming and VDI: the delay between action and response defines playability and whether a remote desktop feels "snappy" or "floating".
In all of these cases, doubling bandwidth adds nothing; reducing RTT changes everything. That is why latency is a first-class parameter when designing a network architecture, not a secondary detail.
The Four Components of Latency
The total delay you measure is not a single thing: it is the sum of four components that accumulate over every leg of the path. Understanding them is what tells you which one to attack.
1. Propagation delay. The time the signal takes to physically cover the distance. In optical fibre light travels at about 200,000 km/s (two thirds of the speed in vacuum because of the glass's refractive index). This imposes an unbreakable physical floor: Madrid to New York is roughly 5,800 km, which on a round trip means at least about 58 ms of propagation alone, before adding any other delay. No software optimisation goes below that; the only way to reduce propagation is to shorten the distance.
2. Transmission (serialisation) delay. The time a node takes to "push" all the bits of a packet onto the medium. It depends on packet size and link speed: on a 1 Gbps link, putting a 1,500-byte packet on the wire takes about 12 microseconds. On fast links it is almost negligible, but on slow or saturated access links it becomes noticeable.
3. Processing delay. The time each router, switch, firewall or proxy spends examining the header, consulting routing tables, applying rules and deciding where to forward. A firewall with deep packet inspection or a proxy terminating TLS adds measurable processing at every hop.
4. Queuing delay. The time a packet waits in a device's queue before being transmitted, when there is more traffic than the link can carry. It is the most variable component and the one responsible for the dreaded bufferbloat: oversized buffers that, instead of dropping packets under congestion, hoard them for hundreds of milliseconds, spiking latency exactly when the network is busy. You can dig into the problem in the reference project on the topic at bufferbloat.net.
Latency vs Bandwidth vs Jitter vs Packet Loss
These four terms are often confused, but they describe distinct phenomena and each affects the experience in its own way:
- arrow_right Bandwidth: maximum data capacity per unit of time (Mbps, Gbps). It determines how much you can transfer, not how long it takes to start.
- arrow_right Latency: round-trip delay (RTT), measured in milliseconds. It determines how "responsive" the system feels.
- arrow_right Jitter: the variation in latency between consecutive packets. Even if the average is low, high jitter ruins VoIP, video and real-time gaming because packets arrive out of order or off beat.
- arrow_right Packet loss: the percentage of packets that never arrive. In TCP it triggers retransmissions and congestion-window collapses, which increase effective latency dramatically.
The key is that they interact: packet loss forces TCP to retransmit (more RTT), and bufferbloat raises latency and jitter at the same time. A healthy network needs all four metrics under control, not just generous bandwidth.
How to Measure Latency Correctly
Measuring well is half the job. These are the fundamental tools and what each one brings:
- check_circle ping: the most direct measure of end-to-end RTT. It sends ICMP packets and reports minimum, average, maximum and deviation. Ideal for a first read, although some devices deprioritise ICMP and may give pessimistic values.
-
check_circle
traceroute / mtr: break the RTT down hop by hop.
mtrcombines traceroute and ping in real time, showing latency and loss for each intermediate node. It is the key tool for locating where the delay grows or at which hop the loss appears. - check_circle iperf3: measures real throughput between two points and lets you separate a latency problem from a throughput problem. Useful to verify whether a link actually delivers the bandwidth you are paying for.
Measure at percentiles, not the average:
Average latency lies. A service with a 20 ms average but a p99 of 400 ms delivers an intermittently terrible experience to 1% of requests — usually the most active users. Always watch the p95 and p99, not just the mean, and do it with continuous monitoring to catch peak-hour congestion and bufferbloat, not a one-off snapshot in a quiet moment.
Common Causes of High Latency
Before reducing latency you have to identify where it comes from. The most frequent causes in production are:
- arrow_right Geographic distance: the dominant factor in many cases. Serving Spanish users from a datacenter in the US or Asia adds tens or hundreds of irreducible milliseconds of propagation.
- arrow_right Network hops and suboptimal routes: traffic that detours through another country for lack of local peering piles up unnecessary delay at every extra hop.
- arrow_right Congestion and bufferbloat: links saturated at peak hour and poorly sized buffers that hold packets in queue for hundreds of milliseconds.
- arrow_right Processing in firewalls and proxies: deep inspection, TLS termination or long chains of middleboxes that add delay at each point.
- arrow_right Latency at the destination: a slow disk, an unindexed database or an overloaded server add service time that the user perceives as "slow network" even when the network is healthy.
How to Reduce Latency
Once you have identified the source, these are the most effective levers, roughly ordered by impact:
- check_circle Move compute closer to the user: the highest-impact lever because it attacks propagation, the physical floor. Edge computing and choosing a nearby datacenter; for customers in Spain, hosting in Spain cuts RTT from over 100 ms to a handful of milliseconds.
- check_circle Direct peering and good routes: interconnecting at local exchange points avoids international detours and shortens the path. We explain how these routes are built in our article on peering and BGP.
- check_circle CDN for static content: caching images, CSS, JS and video on nodes close to the user eliminates the trip to origin for everything that does not change.
- check_circle Optimise TCP and the application layer: cut handshakes with keep-alive and connection reuse, and adopt HTTP/3 over QUIC, which combines session setup and encryption in fewer round trips and removes head-of-line blocking.
- check_circle Reduce hops and middleboxes: simplify the chain of unnecessary firewalls and proxies between the user and the service.
- check_circle Fight bufferbloat with AQM: enable active queue management such as fq_codel or CAKE on edge routers to keep queues short under load and protect interactive latency.
- check_circle Direct cloud connections (NaaS): replacing public-Internet egress with a private link to the cloud provider reduces and stabilises latency. We detail it in Network as a Service with Megaport and in our Network as a Service offering.
Summary Table: Source, Measurement and Fix
This table maps each latency source to the tool that diagnoses it and the lever that reduces it:
| Latency source | How to measure it | How to reduce it |
|---|---|---|
| Propagation (distance) | ping (base RTT), geolocation | Move compute closer, host in Spain, edge |
| Suboptimal routes / hops | traceroute / mtr | Direct peering, better BGP routes |
| Congestion / bufferbloat | mtr under load, ping during saturation | AQM (fq_codel, CAKE), more capacity |
| Repeated static content | Per-resource load times | CDN close to the user |
| Protocol handshakes | Connection analysis (TLS, TCP) | Keep-alive, HTTP/3 / QUIC |
| Firewalls / proxies | Hop-by-hop mtr, middlebox logs | Reduce hops and middleboxes |
| Public cloud egress | ping / iperf to the cloud provider | NaaS / direct private connection |
| Destination server | Application service time | NVMe disk, indexes, more resources |
The Spain Case: Why Sovereignty Is Also Performance
Physics rules. A Spain↔US path easily exceeds 100 ms of RTT, while a Spain↔Spain path sits in the 1 to 10 ms range. That order-of-magnitude difference cannot be offset with more bandwidth or with software: it is distance, and distance is only reduced by moving compute closer. For a service aimed at users and companies in Spain, hosting in a Spanish datacenter makes every network exchange ten to twenty times faster.
This is where data sovereignty stops being just a compliance argument and becomes a performance one. Keeping data and compute in Spain not only satisfies the ENS, GDPR and residency requirements; it also minimises latency for the national user. Compliance and speed point in the same direction.
At EasyDataHost we run our own datacenter in Spain, with low latency for national users, peering at local exchange points and Network as a Service options for direct interconnection with the major cloud providers. If you want to know more about our network infrastructure or to size a low-latency deployment, our team can help with a no-obligation technical review.
Frequently Asked Questions
What matters more, latency or bandwidth?
It depends on the workload. For bulk transfers (backups, streaming, file syncing) bandwidth dominates. For interactive and transactional workloads (databases, APIs, VoIP, gaming, trading, VDI) latency dominates: every round trip is multiplied by the number of exchanges. Adding bandwidth does not reduce latency.
How do I measure network latency correctly?
Use ping for end-to-end RTT, traceroute or mtr to see the delay hop by hop and locate where it grows, and iperf to separate latency from throughput. Measure at percentiles (p95 and p99), not just the average, and monitor continuously to catch peak-hour congestion and bufferbloat.
Why does hosting in Spain reduce latency for Spanish users?
Because propagation has a physical limit: light travels through fibre at about 200,000 km/s, so distance sets a floor no optimisation can beat. Spain↔Spain is around 1-10 ms versus over 100 ms for Spain↔US. Moving compute closer to the user is the most effective lever, which is why data sovereignty is also performance.
Conclusion
In many workloads, latency — not bandwidth — is the real performance bottleneck. Understanding and managing it comes down to a few ideas:
- arrow_right Latency is the RTT, made up of propagation, transmission, processing and queuing, and in interactive workloads it weighs more than throughput.
- arrow_right Measure it with ping, mtr and iperf, always at percentiles (p95/p99) and continuously, not with a one-off snapshot.
- arrow_right Reduce it by moving compute closer, with direct peering, CDN, HTTP/3, fewer hops and AQM against bufferbloat.
- arrow_right For users in Spain, hosting in Spain is the biggest latency optimisation available: data sovereignty is also performance.