DevOps from zero · Lesson 2 of 6 · 4 min read
What happens when you open a website
The journey of one request
Typing shop.example.com and pressing Enter starts a chain of steps that usually finishes in well under a second. Every step is something a DevOps engineer builds, monitors or debugs.
- DNS lookup. Computers talk using IP addresses (numbers like
203.0.113.10), not names. The browser asks a DNS resolver: "What is the IP address of shop.example.com?" - TCP connection. The browser opens a connection to that IP address on port 443 (the standard port for HTTPS). TCP makes sure data arrives complete and in order.
- TLS handshake. The browser and server agree on encryption keys, and the server proves its identity with a certificate. This is the padlock in the address bar.
- HTTP request. The browser sends a request such as
GET /products. - Load balancer. Big sites run many copies of their application. A load balancer receives the request and passes it to a healthy copy.
- Application server. Your company's code runs, often asking a database for data ("which products are in stock?").
- Response. The server replies with a status code (200 means OK, 404 means not found, 500 means the server failed) and the page content.
- Rendering. The browser draws the page, and usually makes more requests for images, styles and scripts.
Enlarge diagram
Swipe sideways to see all of it, or tap to open it full screen.
Where each piece runs
Enlarge diagram
Swipe sideways to see all of it, or tap to open it full screen.
- A CDN (content delivery network) keeps copies of images and static files in data centres close to users, so they load quickly.
- The load balancer spreads traffic and stops sending requests to servers that fail health checks.
- Application servers (or containers) run the code. There are several, so one can fail without taking the site down.
- The database stores the data. It is usually the hardest part to scale and the most important to back up.
- Monitoring watches all of it: how many requests, how many errors, how slow.
Why this matters for DevOps
When someone says "the site is down", this journey is your checklist. Is DNS answering? Can you connect? Is the certificate valid? Is the load balancer seeing healthy servers? Is the app erroring? Is the database slow? The networking, DNS, TLS, HTTP, AWS and Kubernetes topics on this site each go deep on one part of this picture.