Skip to content

Try “polymorphism”, “TCP handshake” or “git rebase”.

    Computer Basics / Networking 3: DNS, HTTP and HTTPS

    Quick Reference

    Glossary and cheat sheet for Networking 3: DNS, HTTP and HTTPS — the page to reread before an interview.

    Extra: Reference8 min read

    Glossary#

    TermPlain meaningChapter
    URLfull web address: scheme, host, port, path, query, fragment1
    percent-encodingwriting special characters as % + hex bytes1
    DNSthe internet's directory from names to IP addresses2
    domain / TLD / subdomaina name / its last part (.app) / a part in front (api.)2
    recursive resolverdoes lookups for you and caches (8.8.8.8, 1.1.1.1)2
    authoritative name serverholds a domain's real records2
    root servers / anycasttop of DNS / many machines sharing one IP, nearest answers2
    DNS TTLseconds an answer may be cached2
    A / AAAA / CNAME / MX / TXT / NSIPv4 / IPv6 / alias / mail / text / name servers2
    apexthe bare domain (studybuddy.app)2
    HTTP / client / serverthe web's request-response protocol / asker / answerer3
    request line / status lineGET /path HTTP/1.1 / HTTP/1.1 200 OK3
    Host headerwhich website on a shared IP3
    chunked encodingsending a body in sized pieces3
    GET / POST / PUT / PATCH / DELETEread / create / replace / change part / remove4
    safe / idempotentchanges nothing / same effect if repeated4
    idempotency keyunique ID letting the server spot retried requests4
    status code families1xx info, 2xx success, 3xx redirect, 4xx client error, 5xx server error5
    header / bodymetadata label / contents6
    MIME type / Content-Typewhat kind of data the body is6
    JSONtext format for structured data6
    serialization / deserializationdata → text/bytes / back again6
    statelesseach request stands alone7
    cookie / sessionsmall data the browser returns on each request / the server's record it points to7
    HttpOnly / Secure / SameSiteno JS access / HTTPS only / not sent cross-site7
    Cache-Control / max-age / no-storecaching rules / how long / never cache8
    ETag / 304 Not Modifiedversion tag / "your copy is current"8
    multiplexing / streammany requests at once on one connection / one of them9
    HTTP/1.1 / HTTP/2 / HTTP/3text over TCP / binary multiplexed over TCP / over QUIC9
    symmetric encryption / AESone shared key / the standard cipher10
    asymmetric / public & private keykey pair: share the public, hide the private10
    Diffie–Hellman / ECDHEagreeing a shared secret over an open channel10
    digital signatureproof of who made something and that it's unchanged10
    certificate / CA / chain"this key is this domain's", signed / the signer / root → intermediate → site10
    TLS / SSL / HTTPSencryption protocol / its old name / HTTP over TLS11
    SNIthe site name sent in the TLS hello11
    forward secrecypast traffic stays safe if a key is stolen later11
    HSTS"always use HTTPS for this site"11
    TLS terminationa proxy handles TLS; app behind it gets plain HTTP11, 12
    forward / reverse proxyacts for clients / acts for servers12
    load balancerspreads requests across app copies12
    CDN / edgeworldwide caching proxies / one location of them12
    X-Forwarded-Forheader carrying the real client IP behind a proxy12

    Cheat Sheet#

    Methods

    Output
      GET read (safe, idempotent) · POST create (neither) · PUT replace (idempotent)
      PATCH partial update (not guaranteed idempotent) · DELETE remove (idempotent)
      retry automatically only if idempotent · otherwise use an Idempotency-Key

    Status codes

    Output
      200 OK · 201 Created · 204 No Content · 301/308 moved permanently · 302/307 temporary · 304 Not Modified
      400 bad request · 401 who are you? · 403 not allowed · 404 not found · 409 conflict · 422 invalid data · 429 slow down
      500 app crashed · 502 upstream sent garbage/reset · 503 unavailable · 504 upstream too slow

    Round trips for a fresh HTTPS visit

    Output
      DNS (0 if cached) + TCP 1 RTT + TLS 1.3 1 RTT + request 1 RTT       HTTP/3: TCP+TLS merged into 1 RTT

    Commands

    Output
      dig example.com                 DNS lookup (+short for just the IP, +trace to watch the full walk)
      nslookup example.com            simpler DNS lookup
      curl -v https://example.com     full request/response with TLS details
      curl -I https://example.com     response headers only
      openssl s_client -connect example.com:443 -servername example.com   inspect the certificate

    Try This Yourself#

    1. Watch DNS walk the tree. Run dig +trace studybuddy.app — or any real domain, e.g. dig +trace github.com. Find the root servers answering, then the TLD servers, then the authoritative servers. Then run dig github.com twice and watch the TTL count down.

    2. Read a real HTTP exchange. Run curl -v https://example.com -o /dev/null. Identify: the TCP connect line, the TLS version and certificate subject, the request line and Host header (lines starting >), the status line and response headers (<), and whether a CDN answered.

    3. Tell the story. Set a 3-minute timer and explain Chapter 13 out loud without notes. Record yourself. Listen for the steps you skipped or rushed, and practise again tomorrow.