The Desi Architect
Notes / Docker Sandboxes / HTTP Caching Headers & DNS Resolution Mechanics
Docker Sandboxes · Tier 0: Start Here · Lab 03

HTTP Caching Headers & DNS Resolution Mechanics

See what really happens when you open a website: a DNS lookup, then an HTTP request, then caches that remember the answer. Make a stale price, a privacy leak and a slow failover happen on purpose, and fix each one.

Time40 minutes
StackEdge cache on 18081Ports 18081
MemoryAbout 40 MB
Before thisLab 01Docker Compose Basics
Verified runWindows, Mac, LinuxBash and PowerShell
  1. 1PrepareWhat you will learn
  2. 2PredictGuess before you run
  3. 3RunStep by step
  4. 4ObserveWhat you should see
  5. 5Break itChange one thing
  6. 6Clean upLeave nothing running
On this page
  1. 00 / What You Will Learn
  2. 01 / Why It Matters
  3. 02 / What We Are Building
  4. 03 / Words You Need
  5. 04 / Predict First
  6. 05 / Step by Step
  7. 06 / What You Should See
  8. 07 / Look Inside
  9. 08 / Break It, Fix It
  10. 09 / In Real Projects
  11. 10 / Interview Corner
  12. 11 / Clean Up

00 /What You Will Learn

By the end you will be able to
  • Read an HTTP request and response: status line, headers and body.
  • Tell 2xx, 3xx, 4xx and 5xx apart, and say what 301, 304, 404 and 500 mean.
  • Use Cache-Control (max-age, no-store, private) and ETag correctly.
  • Recognise a cache hit and a miss, and explain a stale answer.
  • Explain DNS and TTL, and why moving a server does not take effect instantly.

Before you start

You need Docker Desktop running and the basics from Lab 01 (Docker Compose Basics). Nothing else. On Windows PowerShell, type curl.exe when you want the real curl: plain curl is an alias for a different PowerShell command.