Phase 1 of 9 · 5 lessons
Networking and APIs
Understand how a request travels from a phone or browser to your servers and back, and how to design the API it calls.
Every design starts at the edge: DNS finds your servers, a connection carries the request, a proxy or gateway receives it, and an API defines what can be asked. Getting these basics clear makes every later diagram easier to explain.
Lessons, in order
-
1.1
Client–server, DNS, and what happens when you type a URL
Clients (browsers, apps) send requests; servers process them and send responses. DNS turns a name like example.com into an IP address the client can connect to.
-
1.2
HTTP and REST API design
HTTP is the request–response protocol of the web. REST is a style of API design built around resources (nouns) and standard methods (GET, POST, PUT, PATCH, DELETE).
-
1.3
Real-time communication: polling, long polling, WebSockets, SSE
Ways for a server to get new data to a client quickly: the client keeps asking (polling), waits on an open request (long polling), keeps a two-way connection open (WebSockets), or receives a one-way stream (server-sent events, SSE).
-
1.4
CDN (content delivery network)
A network of servers around the world that caches static content (images, video, scripts) close to users.
-
1.5
Proxies, reverse proxies and API gateways
A reverse proxy sits in front of your servers and receives requests on their behalf. An API gateway is a reverse proxy with API features: authentication, rate limiting and routing to the right service.