Skip to content

What actually happens when a user sends a request?

The full journey of a single request — DNS lookup, load balancer, application server, database and back — and why knowing each hop makes debugging far faster.

By 2 min read
  • System Design Fundamentals
  • Backend
  • DNS
  • Web Architecture
  • System Design
  • Software Architecture

You click a button.

What happens next is far more complicated than most engineers realize. Let's say you open a website. From a user's perspective, it feels instant. Behind the scenes, a lot is happening.

The browser first needs to find where the application lives.

  • A DNS lookup translates a domain name into an IP address.
  • The request then travels through multiple network hops before reaching a server.
  • The server processes the request, may talk to other services, query a database, and eventually sends a response back.
  • Only then does your browser render what you see on the screen.

What actually happens when a user sends a request?

All of this typically happens in a few hundred milliseconds. What's interesting is that every step introduces latency. And latency adds up.

  • A slow DNS lookup.
  • An overloaded API.
  • A database query that's a little slower than expected.

Individually, they don't seem like a big deal. Together, they create the experience your users feel.

One lesson that changed how I think about systems: Users don't care where the delay comes from.

  • They only experience the total delay.
  • That's why great systems aren't built by optimizing one component.
  • They're built by understanding the entire request journey.

Because before you can scale a system, you need to understand how it actually works.

Question: What's the most surprising performance bottleneck you've encountered in a real system?

Keep reading