Unit 1: 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.
The big picture
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 this unit
- 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.
- 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).
- Real-time communication: polling, long polling, WebSockets, SSE: There are four 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).
- CDN (content delivery network): A network of servers around the world that caches static content (images, video, scripts) close to users.
- 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.