Back to Articles
Cloud & Network7 min readHow Internet Requests Actually Work · Part 6 of 8

What Happens When You Open a Website? The Complete Request Journey

Trace a browser request from URL parsing and DNS through routers and NAT to a firewall, load balancer, reverse proxy, application, cache, database, and the response journey back.

Web RequestLoad BalancerReverse ProxyFirewallBackend

Opening a website combines every earlier layer. The path differs by browser, protocol, CDN, and architecture, but this model explains most request failures.

Diagram 1

What Happens When You Open a Website?

Opening a website involves URL parsing, DNS resolution, connection setup, HTTP communication, and browser rendering.

1. Parse the URL and Find the Destination

For https://nikh.im/articles, the browser identifies HTTPS as the scheme, nikh.im as the hostname, and /articles as the path. It checks caches and asks DNS for address information when necessary.

URL parsed -> DNS lookup -> Destination IP -> Route selected -> Default gateway

2. Leave the Local Network

If the destination is outside the local subnet, the operating system sends frames toward the gateway. In a typical IPv4 home network, NAT translates the private source endpoint to a public one. Packets then cross the ISP and other routed networks; routing policy determines suitable next hops rather than one permanent path.

3. Establish Transport and Security

HTTP/1.1 or HTTP/2 normally uses TCP to destination port 443. HTTP/3 uses QUIC over UDP. HTTPS authenticates the server and creates encrypted traffic keys through TLS before protected HTTP messages flow.

4. Enter the Server Network

Diagram 2

What Happens Inside a Server Environment

Production traffic often passes through several routing and security components before application and data processing begins.

Internet -> Firewall or edge -> Load balancer -> Reverse proxy or API gateway -> Application -> Cache, database, queue, or service

Firewall
Allows intended traffic while blocking unwanted network access.
Load balancer
Distributes traffic among healthy application instances.
Reverse proxy
Receives requests for backends and can terminate TLS, route paths, compress, or limit traffic.
API gateway
Adds API routing, authentication, quotas, transformations, and observability.

Nginx might listen publicly on 443 and forward to a Node.js process on private port 3000. The client knows only the public hostname; the proxy owns internal routing.

5. Process the Application Request

GET /api/products/100

AuthenticateValidateCheck cacheQuery databaseApply business rulesReturn { "id": 100, "name": "Laptop", "price": 75000 }

One browser request can create many downstream calls between applications, databases, queues, and services. Each may introduce its own DNS lookup, connection, packets, and response.

6. Return and Render

The response travels back through the proxy, load balancer, network, NAT device, operating system, and browser. Parsing HTML can reveal CSS, JavaScript, fonts, and images, triggering more requests. Connection reuse and multiplexing reduce repeated setup.

Diagram 3

Complete End-to-End Packet Flow

The full round trip combines local routing, internet forwarding, server-side processing, and the response path back to the browser.
  • DNS failure means the name did not produce usable address information.
  • Connection refused means nothing accepted the connection or a device actively rejected it.
  • Connection timeout can indicate blocking, routing, loss, or an unresponsive endpoint.
  • 502 means a gateway received an invalid upstream response.
  • 504 means a gateway waited too long for an upstream response.

Debug by boundary

Ask how far the request progressed: DNS, routing, connection, TLS, proxy, application, or downstream dependency.

Series

How Internet Requests Actually Work

An eight-part beginner series tracing internet communication from an HTTP request through DNS, IP, ports, transport protocols, packets, network devices, server infrastructure, security, and troubleshooting.

Part 6 of 8
About the Author

Nikhlesh Yadav is a Technical Lead and Solution Architect with 12+ years of experience across cloud-native systems, distributed platforms, AI integrations, Web3, and cyber security.

Read full profile