Protocols & standards

Latency

The time delay between a request and response, typically measured in milliseconds.
← Back to glossary

What is latency?

Latency is the time delay between initiating a request and receiving a response, typically measured in milliseconds (ms). In networking and DNS contexts, latency represents the round-trip time for data to travel from a client to a server and back. Low latency is critical for fast website loading, responsive applications, and positive user experiences. High latency causes noticeable delays that frustrate users and can impact business metrics.

Types of latency

Network latency

Time for data packets to traverse the network:

  • Physical distance between client and server
  • Number of network hops (routers, switches)
  • Network congestion and bandwidth limitations
  • Quality of network infrastructure

DNS latency

Time to resolve a domain name to an IP address:

  • DNS server response time
  • Cache status (hit vs miss)
  • DNS query chain (resolver → authoritative)
  • DNSSEC validation overhead

Application latency

Time for applications to process requests:

  • Database query execution
  • Server-side processing
  • API response generation
  • Backend service communication

Measuring latency

Common tools

# Ping test (ICMP latency)

ping example.com

# DNS resolution time

dig example.com | grep "Query time"

# HTTP timing

curl -w "@curl-format.txt" -o /dev/null -s https://example.com

Key metrics

MetricDescriptionGood Target
RTT (Round Trip Time)Complete request-response cycle<100ms
TTFB (Time to First Byte)Server response initiation<200ms
DNS ResolutionDomain to IP lookup<50ms
Connection TimeTCP handshake completion<100ms

Latency impact by region

Geographic distance directly affects latency:

RouteTypical Latency
Same city1-10ms
Same country20-50ms
Same continent50-100ms
Cross-continental100-200ms
Global (opposite sides)200-300ms

Reducing DNS latency

Anycast DNS

Deploy DNS servers globally, route queries to nearest:

  • Multiple servers share same IP address
  • Automatic routing to closest location
  • Built-in redundancy

DNS caching

Use TTL for repeated lookups:

example.com.  300  IN  A  192.0.2.1

↑ TTL in seconds

  • Browser cache (seconds to minutes)
  • Operating system cache
  • ISP resolver cache

EDNS client subnet

Enable geographically-aware responses:

  • Client location passed to authoritative server
  • Return closest server IP
  • Improved CDN performance

Reducing overall latency

Content delivery networks (CDNs)

  • Cache content at edge locations
  • Serve users from nearby servers
  • Reduce origin server load

Connection optimization

  • HTTP/2 multiplexing
  • Keep-alive connections
  • TLS session resumption
  • HTTP/3 (QUIC) for reduced handshakes

Infrastructure choices

  • Multiple data center locations
  • Premium network providers
  • Optimized routing paths
  • Edge computing for dynamic content

Latency vs bandwidth

Understanding the difference:

  • Latency: How fast data starts arriving (delay)
  • Bandwidth: How much data can flow per second (throughput)

Both matter for performance, but latency often has greater impact on user-perceived speed, especially for interactive applications.

Low latency is essential for modern web performance, directly impacting user satisfaction, conversion rates, and search engine rankings.

Put this knowledge to work

Use DomScan's API to check domain availability, health, and more.