System Design · Module 02
Networking, APIs and load balancing
- Lessons
- 14
- Free
- 2
- Reading
- ~4 h
Your progress
0 / 14 lessons done
Sign in to trackLessons
- TCP and UDP: reliable vs low-latency deliveryA slow request can come from the network, not your application. Understanding transport behavior helps you diagnose pauses, set deadlines and avoid unsafe retries.
- DNS: how domain names resolve to IP addressesFreeA healthy application can still be unreachable because clients cannot find its address. DNS also determines how safely you can move traffic when infrastructure changes.
- HTTP and HTTPS: how clients and servers communicateFreeWhen a page fails, you need to know whether the connection, secure channel or application failed. These boundaries also determine where you can inspect requests and which systems can read customer data.
- HTTP/2 and HTTP/3: faster, multiplexed connectionsA slow page may be waiting for a connection, missing network data, or application work. Knowing the difference helps you choose a protocol change instead of adding servers that cannot fix the delay.
- REST API design: resources, methods and status codesMobile networks lose responses, clients retry, and several devices can edit the same data. Your API contract determines whether those events produce a recoverable error or an unexpected purchase.
- API versioning: changing APIs without breaking clientsMobile apps and partner integrations can outlive several server releases. You need to improve the API without making those clients misread data or stop working.
- Pagination: offset vs cursor-basedList endpoints can repeat items, hide items or become slower as users browse deeper. Pagination connects the API contract to the database access path and the consistency users actually see.
- gRPC: high-performance calls between servicesBackend components often use different languages and deploy separately. gRPC gives them a shared contract, but you still need to design validation, compatibility and failure behavior.
- GraphQL: clients requesting exactly the data they needDifferent screens often need different combinations of the same data. GraphQL gives clients more control over those combinations, but makes backend work and partial failures important parts of API design.
- Synchronous and asynchronous service communicationA slow dependency can make an otherwise healthy API feel broken. Separating immediate results from deferred work helps you control that dependency without hiding failures.
- Load balancers: distributing traffic across serversAdding application servers only helps when traffic can reach them. You need to understand routing and failure handling before extra servers improve capacity or availability.
- API gateways and load balancers: roles comparedBackend teams often inherit several proxies without clear ownership. Knowing each role helps you place security checks, avoid unnecessary network hops and diagnose failed requests.
- Sticky routing with consistent hashingRouting related requests to one server can preserve useful local state. You need to understand what happens when that server disappears, the fleet grows, or one key attracts most of the traffic.
- Design: a food delivery APIMobile APIs must handle lost responses, old clients and concurrent actions. Food delivery brings these problems together: a customer needs one dinner, the restaurant needs an unambiguous order, and every screen needs the same current state.
Practise with
Terms this module teaches 57
Open glossaryAPI contract
The accepted requests, returned data and observable behavior that clients can depend on.
API gateway
An entry point that applies shared API policies and forwards accepted requests to backends.
Asynchronous communication
Communication where the caller hands off work and can continue before that work finishes.
Authoritative nameserver
A DNS server that serves the published records for a particular part of the DNS namespace.
Backend group
A named collection of server instances eligible to receive a particular kind of traffic.
Backward compatibility
Keeping existing clients working when the server changes.
Breaking change
A change that prevents a previously supported client from using an API correctly.
Certificate
A signed document binding an identity to a public key, evaluated using the client’s trust and identity-validation rules.
Client stub
A local interface that encodes a remote operation’s inputs and uses a runtime to send the call.
CNAME record
A DNS record that makes one name an alias of another name.
Congestion control
Adjusting network transmission to avoid overloading the network path.
Consistent hashing
A way to spread data over machines so that adding or removing one moves only that machine’s share of the data.
Contract test
A check that an API implementation satisfies the requests, responses or behavior expected by a client.
Cursor pagination
Continuing a list by returning a server-provided value from the previous response. The value can represent an ordered boundary, an offset or another continuation mechanism.
DNS time to live
The lifetime, in seconds, that limits ordinary reuse of a cached DNS answer.
ETag
An HTTP representation validator that a client can return in a conditional request.
Flow control
Limiting transmission according to the receiver’s ability to accept data.
GraphQL
A query language for APIs where the client asks for exactly the fields it needs in one request, checked against a typed schema.
GraphQL resolver
Server logic that supplies the value of a selected field, using its parent value, arguments and request context.
GraphQL schema
The typed contract describing the fields, arguments and operations a GraphQL server exposes.
gRPC
A framework for calling operations across a network using shared service definitions and generated client and server bindings.
Head-of-line blocking
Ready work waiting because earlier work or data must be completed or delivered first.
Health check
A configured test that provides evidence about whether a backend should receive traffic.
HTTP multiplexing
Carrying several request-response exchanges over one connection by identifying each exchange separately.
HTTP stream
An identified exchange inside a connection that can carry many exchanges at once.
HTTPS
HTTP communication over a protected channel that authenticates the server and protects data in transit.
Idempotency
The property that repeating an operation has the same intended effect as performing it once.
Idempotency key
A unique value a client sends with a request, so the server can recognise a retry and avoid doing the work twice.
Keyset pagination
Pagination that continues after the last returned ordering values instead of skipping a number of rows.
Message broker
A service that accepts messages and delivers them to consumers according to its messaging rules.
N+1 queries
A fetching pattern with one query for a list followed by a separate relationship query for each item.
Negative caching
Remembering a DNS answer that says a name or requested record type does not exist.
Pagination
Returning a list in bounded portions, with a rule for requesting another portion.
Payment authorization
Approval from a payment provider to collect a specified amount later, subject to the provider’s rules and expiry.
Polling
An app asking a server for the latest state again and again, on a fixed interval.
Protocol Buffers
A schema language and serialization system that represents messages using numbered fields.
Publish and subscribe
A messaging pattern where senders publish to a named channel and every current subscriber to that channel receives the message.
Push notification
A message delivered to a phone through Apple’s or Google’s push service, even when the app isn’t running.
QUIC
A secure transport carried over UDP that provides reliable streams with separate delivery ordering.
Recursive resolver
A DNS service that finds an answer on a client’s behalf and can reuse cached answers.
Remote procedure call
A request to execute a named operation in another process across a network.
Representation
Data and metadata that describe a resource’s state in a form suitable for exchange.
Resource
Something an API identifies and allows clients to interact with, such as a product, cart or order.
REST
A style of HTTP API where URLs name resources and standard methods such as GET, POST, PUT and DELETE act on them.
Round robin
A scheduling rule that selects eligible destinations in a repeating order.
RPC deadline
The time after which a caller stops waiting for a remote call to complete.
Server-sent events
A long-lived HTTP response that the server keeps writing events into, one-way from server to client.
Socket
An interface an application uses to send and receive network data through the operating system.
State machine
A fixed set of states plus the allowed moves between them, and who may make each move.
Sticky routing
Routing related requests to the same server, usually using a cookie or a stable request key.
Synchronous communication
Communication where the caller needs the receiver’s result before finishing its current operation.
TCP acknowledgement
Transport feedback whose acknowledgement number identifies the next sequence position the receiver expects.
TCP sequence number
A number identifying a position in a TCP byte stream.
TLS termination
Ending a TLS connection at a component that decrypts its traffic before processing or forwarding it.
UDP
A transport protocol that sends separate messages without providing delivery, ordering or duplicate-protection guarantees.
Virtual node
One of many points a single machine is given on the consistent hashing circle, so that its share of the data comes out even.
WebSocket
A long-lived two-way connection that lets client and server send messages to each other at any time.