LESSON 01 · The request path

Begin with one server

Follow a request before adding any infrastructure.

SYSTEM VIEW

The architecture

Diagram view
Users—
Requests served—
Servers up—

Watch one request go from a domain name to a single server that runs everything.

  1. A visitor enters shop.example. DNS, the internet’s directory of names, resolves it to 203.0.113.10. The answer carries a time to live (TTL) of 300 seconds, which says how long it may be reused.

    What changed

    • shop.example → 203.0.113.10
    • TTL 300 s
  2. The browser connects to 203.0.113.10 and sends an HTTP request: GET /. DNS found the address; HTTP carries the request and its response.

    What changed

    • Connection to 203.0.113.10
    • GET /
  3. The application reads a product list from the database on the same machine and sends back HTML. No network hop separates the code from its data, so the path stays short and easy to debug.

    What changed

    • Database read on the same machine
    • 200 OK with HTML
  4. At an example 10,000 daily users making 20 requests each, the average is about 2.3 requests a second (200,000 ÷ 86,400), well within reach of one modest machine running Nginx and Postgres. More parts add operational work, so traffic alone isn’t a reason to deploy every scaling technique at once: first find the part that fails or slows down.

    What changed

    • 10,000 users a day
    • About 2.3 requests a second
  5. The cost is risk, not speed. This machine is a single point of failure: a crash or restart takes the site offline, and a dead disk can destroy the data unless backups live elsewhere. Move on once downtime becomes expensive or one resource runs out.

    What changed

    • Server down
    • Site offline
    • Dead disk: data lost unless backups live elsewhere
    What fails

Space plays · ← → step · Home resets

THE IDEA

How it works

A small application can begin with its web code, database, and cache on one machine. A person enters a domain; DNS, the internet’s directory of names, resolves it to an IP address; the client sends an HTTP request to that address; the server returns a response such as HTML or JSON.

Follow one request with example values. A browser looks up shop.example and receives 203.0.113.10, along with a time to live (TTL) of 300 seconds that says how long the answer may be reused. It connects to that address and sends GET /. The application reads a product list from the local database and sends back HTML. No network hop separates the code from its data, so the path stays short and easy to debug.

One server goes further than many people expect. At an example 10,000 daily users making 20 requests each, the average is about 2.3 requests per second (200,000 ÷ 86,400), well within reach of one modest machine running Nginx and Postgres. More components add operational work, so traffic alone is not a reason to deploy every scaling technique at once. First find the part that fails or slows down.

The cost is risk, not speed. This machine is a single point of failure, one part whose loss stops the whole service: a crash or restart takes the site offline, and a dead disk can destroy your data unless backups live elsewhere. Move on once downtime becomes expensive or one resource runs out.

DECISION POINT

Your new site has a few daily users. Trace how a browser reaches its home page.

Write a sentence or two to unlock the guidance. Committing first is what makes it stick.

Keep in mind

  • DNS finds an address; HTTP carries the request and response.
  • A single server is a reasonable starting point and a single point of failure.
CHECK YOUR UNDERSTANDING

Put it into practice.

1 OF 3
RecallQUESTION 01

What does DNS supply before the browser sends an HTTP request?

Choose an answer. You’ll see the explanation once you get it right.

Next lesson

0 of 3 checkpoints answered correctly to complete this lesson.