FSD Frontend System Design

Part I β€” The Pipes

1 Networking

GoalUnderstand how bytes travel from a server to a pixel, and pick the right API style.

  1. 1.1 Important Guidelines Watch, then redraw the diagram from memory, then build it β€” three passes or it does not stick. Learning loop cycle Β· 8 min
  2. 1.2 Why Networking Matters Most of a page load is waiting, not computing β€” so most of your wins live in the network. Latency budget bar Β· 10 min
  3. 1.3 How the Web Works URL β†’ DNS β†’ TCP β†’ TLS β†’ HTTP β†’ parse β†’ render: six hops, each with a cache in front of it. Sequence: Browser β†’ DNS β†’ CDN β†’ Origin, with ms labels Β· 16 min
  4. 1.4 Communication Protocols HTTP/1.1 queues, HTTP/2 multiplexes over one TCP stream, HTTP/3 removes TCP's shared queue entirely. Head-of-line blocking, three versions side by side Β· 15 min
  5. 1.5 REST APIs Nouns as URLs, verbs as methods, state in the response β€” and every call stands alone. Resource tree + verb/idempotency matrix Β· 16 min
  6. 1.6 GraphQL One endpoint, one round trip, and the client declares exactly which fields it needs. REST 3 round trips vs GraphQL 1 round trip Β· 16 min
  7. 1.7 gRPC Binary contracts over HTTP/2 β€” call a remote function like a local one, in a fraction of the bytes. Payload size bar: JSON vs Protobuf Β· 14 min
  8. 1.8 Choosing: REST vs GraphQL vs gRPC Pick by who the clients are and how nested the data is β€” not by what's newest. Decision tree + comparison matrix Β· 12 min

Capstone

Draw the full network path for loading an Instagram post, with every cache hit marked.