Phase 1: Core Fundamentals
Explore the concepts of Core Fundamentals.
Client-Server Architecture
Client-server communication patterns define how a client and server exchange data over a connection: the classic request-response model, plus three techniques for pushing updates to the client - long polling, WebSockets, and server-sent events. The right pattern depends on how fresh the data must be and which side initiates messages. 🧠 Mental model: Request-response = asking a question and waiting for the answer. Long polling = calling a friend and saying "stay on the line until you have news." WebSockets = a walkie-talkie - both sides can talk anytime. SSE = a radio station - you just listen.
Network Protocols (TCP/UDP/HTTP/WebSockets)
Networking foundations are the core protocols that move data across the internet: DNS resolves human-readable names to IP addresses, HTTP and HTTPS carry web requests and responses, and TCP and UDP are the two transport protocols that actually ship the bytes. Together they underpin every distributed system. 🧠 Mental model: DNS is the phone book (name -> number). TCP is a phone call (reliable, ordered conversation). UDP is shouting across the room (fast, but some words get lost). HTTP is the language you speak on the call.
Domain Name System (DNS)
The Domain Name System (DNS) is the phone book of the internet. Humans access information online through domain names, like google.com or example.com. Web browsers interact through Internet Protocol (IP) addresses. DNS translates domain names to IP addresses so browsers can load internet resources. 🧠 Mental model: DNS is like the contacts app on your phone. You remember the name "Alice," but your phone needs her actual phone number to make the call. DNS does this translation instantly for the web.
Load Balancing
A load balancer is a component that distributes incoming requests across a pool of backend servers so that no single server is overwhelmed. It also improves availability by routing traffic only to healthy servers, and it is a prerequisite for scaling a stateless service horizontally. 🧠 Mental model: A load balancer is the host at a restaurant - directing each arriving guest to a table that isn't too full, and seating no one at a broken table.
API Design (REST/GraphQL/gRPC)
REST, GraphQL, and gRPC are three styles for designing APIs between clients and services. REST models resources over HTTP, GraphQL lets clients query exactly the fields they need through a single endpoint, and gRPC is a contract-first, binary remote-procedure-call framework built for fast service-to-service communication. 🧠 Mental model: REST is a menu with fixed dishes. GraphQL is a build-your-own-bowl - you pick exactly the ingredients you want. gRPC is the kitchen intercom - fast, coded language that only the cooks (services) understand.
Latency vs Throughput
Performance metrics quantify how fast and how much a system can serve. The core metrics are latency (how long one request takes), throughput (how many requests complete per unit time), and response-time percentiles such as p50, p95, and p99 that describe the distribution of latency rather than a single average. 🧠 Mental model: Latency is how long one car takes to cross a bridge. Throughput is how many cars cross per hour. A wider bridge (more lanes) improves throughput; a shorter bridge (less distance) improves latency. P99 is the slowest car that gets stuck behind a truck.
Vertical vs Horizontal Scaling
Scalability is a system's ability to handle growing load - more users, requests, or data - by adding resources, ideally with a proportional and predictable gain in capacity. A system scales well when roughly doubling its resources roughly doubles the work it can do, without a redesign. 🧠 Mental model: Scaling is like handling a growing restaurant. Vertical scaling = bigger kitchen. Horizontal scaling = opening more branches. At some point, one kitchen simply can't fit more ovens.