🌍 System Design · flashcards
System Design Distributed System Components Flashcards
52 question-and-answer cards covering Distributed System Components as it is examined in System Design. 24 of them are printed below, taken from across the deck — no signup, no paywall on the preview.
24 sample cards from the Distributed System Components deck
Sampled from the end of the deck, so these are different cards from the ones shown on the syllabus page.
Why does edge caching reduce latency and origin load?
Content is served from a geographically nearby PoP instead of the distant origin, shortening the network round-trip and absorbing requests so the origin sees far fewer hits.
Contrast a push CDN with a pull CDN.
Push CDN: you proactively upload/push content to edge servers ahead of time (you control what/when; good for large, infrequently changing files). Pull CDN: the edge fetches content from origin on the first user request and caches it (self-populating on demand; good for frequently updated sites).
For a website with lots of traffic and frequently changing assets, which CDN type is usually preferred and why?
A pull CDN, because it lazily caches only requested content and stays current with less manual management, whereas a push CDN requires you to re-upload on every change.
What does the HTTP header `Cache-Control: max-age=3600` specify?
It sets the freshness lifetime (TTL) of the response to 3600 seconds; the cached copy is considered fresh for one hour before it must be revalidated or refetched.
Contrast the `no-cache` and `no-store` Cache-Control directives.
`no-cache` allows storing the response but requires revalidation with the origin before each reuse; `no-store` forbids caching the response entirely (nothing is written to any cache).
What do the `public` and `private` Cache-Control directives mean?
`public` allows any cache, including shared/CDN caches, to store the response; `private` restricts storage to the end user's browser cache only, not shared intermediaries.
How do the `ETag`/`If-None-Match` headers enable conditional requests?
The server sends an `ETag` (content fingerprint); the client resends it as `If-None-Match`, and if unchanged the server replies `304 Not Modified` with no body, saving bandwidth.
Contrast point-to-point and publish/subscribe messaging models.
Point-to-point (queue): each message is consumed by exactly one receiver; competing consumers share the load. Pub/sub (topic): each message is broadcast to all subscribers, so every subscriber gets its own copy.
In Kafka, what are a topic, a partition, and an offset?
A topic is a named category of messages; a partition is an ordered, append-only log that a topic is split into for parallelism; an offset is the sequential ID of a record within a partition, tracking consumer position.
How does Kafka guarantee message ordering, and how does it use consumer groups for scaling?
Ordering is guaranteed only within a single partition (not across a topic). In a consumer group, each partition is consumed by at most one consumer in the group, so parallelism is capped by partition count.
In Kafka replication, what are the leader, followers, and ISR?
Each partition has one leader replica that handles all reads/writes and follower replicas that copy it. The ISR (In-Sync Replicas) is the set of replicas fully caught up with the leader; a message is 'committed' once all ISR members have it.
What is Kafka's retention model, and how does it differ from a traditional queue?
Kafka is a durable, replayable log: messages are retained for a configured time or size regardless of consumption, and consumers can re-read by resetting offsets — unlike traditional queues that delete a message once acknowledged.
In RabbitMQ/AMQP, what is the role of an exchange versus a queue?
Producers publish to an exchange, never directly to a queue; the exchange routes messages to bound queues based on routing keys and bindings, and consumers read from queues.
Name the four main AMQP exchange types and how each routes.
Direct (routing key equals binding key exactly), Topic (routing-key pattern match with `*` and `#` wildcards), Fanout (broadcast to all bound queues, ignoring key), and Headers (routes on message header attributes).
Compare Kafka and RabbitMQ in terms of consumption model.
Kafka is pull-based with a retained, replayable partitioned log optimized for high-throughput streaming; RabbitMQ is a smart broker that pushes messages, deletes them after ack, and excels at complex routing and low-latency task queues.
Define the three message delivery guarantees: at-most-once, at-least-once, and exactly-once.
At-most-once: message delivered 0 or 1 times (may be lost, never duplicated). At-least-once: delivered 1+ times (never lost, may duplicate — needs idempotent consumers). Exactly-once: delivered precisely once (hardest; needs dedup/transactions).
What is backpressure in a messaging/streaming system, and name two ways to handle it?
Backpressure is the mechanism by which a slow consumer signals producers to slow down when it can't keep up. Handle it via buffering/queuing, rate limiting the producer, dropping/sampling messages, or blocking (pull-based flow control).
What is a dead-letter queue (DLQ) and when is a message sent there?
A DLQ holds messages that cannot be processed successfully — e.g., repeatedly failing (exceeding max retries), rejected/nacked without requeue, expired (TTL), or exceeding queue length — for later inspection instead of blocking the main queue.
Contrast a forward proxy and a reverse proxy by whom they represent.
A forward proxy sits in front of clients and acts on their behalf toward the internet (client anonymity, filtering, caching outbound). A reverse proxy sits in front of servers and acts on their behalf toward clients (load balancing, TLS termination, hides backend).
List three responsibilities commonly handled by a reverse proxy.
Load balancing across backends, SSL/TLS termination, caching of static content, request compression/rewriting, and hiding/protecting the backend topology from clients.
List four core responsibilities of an API Gateway.
Single entry point / request routing, authentication & authorization, rate limiting/throttling, request-response transformation & aggregation, plus caching, logging/monitoring, and SSL termination.
How do the token bucket and leaky bucket rate-limiting algorithms differ?
Token bucket refills tokens at a fixed rate up to a capacity and allows bursts by spending accumulated tokens. Leaky bucket processes requests at a constant fixed rate (queue draining), smoothing bursts into a steady outflow but not permitting bursts.
Contrast fixed window and sliding window rate limiting, and name the flaw fixed window has.
Fixed window counts requests per discrete interval (e.g., per minute); its flaw is the boundary/edge burst where up to 2× the limit can pass around the window edge. Sliding window (log or weighted counter) tracks a rolling time span, smoothing that boundary spike.
Which HTTP status code and header does a server return when a client is rate limited?
HTTP `429 Too Many Requests`, typically accompanied by a `Retry-After` header telling the client how long to wait before retrying.
What this deck covers
The Distributed System Components deck follows the System Design Distributed System Components syllabus — 6 chapters and 22 topics — so questions land on material that is genuinely examinable rather than trivia around it. That works out to roughly 8.7 cards per chapter.
Answers are written to be recallable, not just readable — averaging about 211 characters, which is long enough to carry the reasoning and short enough to say out loud.
A deck like this earns its keep on the second and third pass. Read the syllabus first so you know the shape of the subject, then use the cards to find the specific facts that have not stuck.
Distributed System Components flashcards FAQ
How many Distributed System Components flashcards are in this System Design deck?
52 cards. This page previews 24 of them, sampled evenly across the deck so you can judge the difficulty before installing anything.
Are these System Design flashcards free?
Yes. The preview here is free to read with no signup, and the full 52-card deck is free inside the Examius app.
What do the Distributed System Components cards cover?
They follow the System Design Distributed System Components syllabus — 6 chapters and 22 topics — so the questions track what is actually examinable.
How should I use these flashcards?
Read the syllabus first so you know the shape of the subject, then drill the deck. Examius schedules each card with spaced repetition, so cards you keep missing come back sooner and ones you know drift further apart.