Skip to main content
Foundations: web, servers, containersLesson 1 of 13

When You Type an Address

Type https://portal.example.com into the address bar and wait for the page. Follow, one step at a time, where the request goes and what comes back. How a request reaches a Pod through a Service inside Kubernetes continues in How a Request Reaches a Pod.

Destinationportal.example.com
ConnectionNone
Status code—
Data center · internal networkBrowserUser PCInternetExternal networkDNS serverName to addressLoad balancerOne front addressWeb server 1Pages · APIWeb server 2Pages · APIIP address?
RequestResponse / reportAppears in a later step

What you will learn

  • DNS turns a name into an IP address
  • What the IP address and the port each select
  • How the first digit of a status code tells whose problem it is
  • A load balancer keeps one address working
  • The limits of internal and air-gapped networks

Find the failing step from the symptom​

SymptomFailing stepWhat to check
Site cannot be foundDNS · connectionCheck name resolution with nslookup, check access to the internal network
"Not secure" warningEncryption (certificate)Check for an expired certificate, a domain mismatch, or a private certificate
Page loads but the list is emptyData request (API)Check the API response status code in the browser developer tools
401 / 403Response401: check credentials (login, token). 403: check permission settings
504Response (timeout)Check backend response time and health. The request may actually have been processed
Broken fonts or slow page renderingAir-gapped networkCheck for external CDN resources and host them internally

Try it yourself​

dig +short <domain> # Step 2: name to IP address
nc -zv <domain> 443 # Step 3: is port 443 reachable?
curl -v -o /dev/null https://<domain>/ # Connect, certificate, request, status code
curl -s -o /dev/null -w '%{http_code} %{time_total}s\n' https://<domain>/ # Status code and response time

Check yourself

  1. The page loads, but the list on it is empty. Which step most likely failed?
  2. A request returns 504. What should you keep in mind before retrying it?
  3. Web server 1 stops. Why can users keep using the same address?

Further reading: An overview of HTTP (MDN) · HTTP response status codes (MDN) · Service (Kubernetes docs) · DNS for Services and Pods