System Design Interview Questions: Fundamentals Practice Quiz

Reviewed by Mark Dickie · Last updated

6 questions on this page you can answer and see marked on the spot. Go to the first one

System design is the process of defining a system's architecture, components, data flow, and interfaces to meet given requirements. For a fundamentals interview, you need to talk through how a request moves from a client to a database, name the components you'd put in its path, and explain the tradeoffs each choice introduces. Interviewers are listening for concrete building blocks: load balancers, caches, message queues, partitioned databases, and whether you can justify why each one belongs. They also want you to reason about latency, throughput, consistency, and availability as pressures you balance against each other, not items on a memorized checklist.

AreaWhat the interviewer is checking
Horizontal vs vertical scalingCan you say when adding machines beats adding CPU and RAM?
Load balancingDo you know the common algorithms and where session state lives?
CachingCan you pick a write strategy and explain cache invalidation?
Partitioning / shardingCan you shard by key, spot hot partitions, and reason about cross-shard reads?
Consistency modelsDo you understand strong vs eventual consistency and the CAP tradeoff?
ReplicationCan you compare single-leader and multi-leader setups and say what fails over?

What does a System Design fundamentals interview test?

It tests whether you can take a vague prompt like "design a URL shortener" and produce a coherent, defensible architecture under time pressure. The interviewer cares less about the exact tool names and more about your reasoning: why a cache goes here, why a message queue goes there, and what breaks if traffic doubles. You should be able to estimate rough capacity numbers and identify the single component that would fail first.

A typical interview flow looks like this:

  1. Clarify functional and non-functional requirements before drawing anything.
  2. Estimate the scale: queries per second, storage, bandwidth, and the read/write ratio.
  3. Sketch a high-level diagram and walk a single request through every hop.
  4. Name the bottleneck and state which tradeoff you accept.
  5. Discuss failure modes: what happens when a node dies or a network partition occurs.

Which tradeoffs come up most often?

The CAP theorem is the one interviewers reach for first: in the presence of a network partition you choose between consistency and availability. Beyond CAP, expect to compare latency against throughput, strong consistency against eventual consistency, and synchronous writes against asynchronous ones. Caching questions tend to center on invalidation and the stale-read window. Partitioning questions tend to center on hot keys and the cost of cross-shard joins. Knowing which side of each tradeoff a system sits on, and being able to say why, is what separates a passing answer from a strong one.

Key facts

  • Tarmac has 103 System Design interview questions on this topic, 10 of them on this page, at difficulty 1–5 of 5.
  • Tarmac tracked 2,173 job postings asking for System Design in November 2026.
  • Roles asking for System Design advertise a median base salary of £86,000, across 642 job postings as of November 2026.
  • Tarmac last reviewed these System Design interview questions on 12 October 2026.

At a glance

Questions10 shown · 103 in the bank
Difficulty1–5 of 5
FormatsTrue / false, Fill in the blank, Multiple choice, Multiple answer, Ordering, Flashcard, Design exercise, Short answer

What you'll review

  1. scalability
  2. caching strategies
  3. id generation

Practice questions

Try one before you open the answer. Pick an option and press Check; it's marked on the spot.

Vertical scaling (scaling up) is generally considered easier to implement than horizontal scaling (scaling out), but it has a hard upper limit because a single machine's hardware capacity is finite.#

Options

Show answer

This statement is true. Vertical scaling is simpler to implement because it involves only upgrading a single machine's hardware with no application-level changes. However, it hits a hard ceiling determined by the maximum specs available for a single server. Horizontal scaling bypasses this limit by adding more machines, at the cost of increased architectural complexity.

Why:

Vertical scaling requires no changes to application architecture — you simply upgrade the server's CPU, RAM, or storage — making it straightforward to implement. However, hardware has a physical ceiling: there is a maximum amount of RAM or number of CPU cores you can add to one machine. Horizontal scaling removes this ceiling by adding more machines, but it introduces complexity such as load balancing, distributed state management, and network partitioning concerns.

To reduce repeated expensive database queries and improve read scalability, engineers store query results temporarily in a fast in-memory layer. This general technique is called _____. A long-established in-memory caching daemon whose values are opaque byte strings, with no built-in lists, sets, or hashes, is _____.#

Show answer

To reduce repeated expensive database queries and improve read scalability, engineers store query results temporarily in a fast in-memory layer. This general technique is called caching. A long-established in-memory caching daemon whose values are opaque byte strings, with no built-in lists, sets, or hashes, is Memcached.

Why:

Storing the results of expensive or repeated operations such as database queries in a fast, temporary in-memory layer so later requests skip the database is called caching, so the first blank accepts caching and its common phrasings. The second blank describes a store whose values are opaque byte strings with no built-in lists, sets, or hashes; that describes Memcached. Redis, Valkey, KeyDB, Dragonfly, Hazelcast, and Apache Ignite all offer richer structures, so they do not fit the description, and the prompt avoids naming a license-dependent or superlative-qualified tool.

A stateless web service is receiving increasing read traffic and its single server is approaching CPU saturation. Which scalability strategy allows the service to handle more concurrent requests without changing the specs of any individual server?#

Options

Show answer

Horizontal scaling is the strategy that lets a stateless web service handle more concurrent requests without upgrading any server's hardware. You add identical instances behind a load balancer, which spreads incoming requests across them. Vertical scaling, by contrast, requires bigger individual machines.

Why:

Horizontal scaling adds more identical instances of the stateless service and spreads incoming requests across them with a load balancer, so the total number of concurrent requests the tier can serve grows while each server keeps its existing specifications. Upgrading CPU and RAM is vertical scaling, which the question excludes by requiring no hardware change. Keeping session data in one server's memory works against statelessness and ties users to that machine, and lowering clock speed reduces capacity rather than adding it. The load balancer is part of the answer only as the mechanism that distributes requests across the added replicas.

Which of the following are effective techniques for increasing the read throughput of a relational database? Select all that apply.#

Options

Pick every one that applies.

Show answer

Read replicas, a read-through cache in front of the database, and sharding by user ID all improve relational database read throughput. Replicas add nodes that serve SELECT queries, the cache answers repeated reads from memory, and sharding spreads read load across nodes. Dropping indexes or forcing SERIALIZABLE on reads makes read throughput worse, not better.

Why:

Read replicas increase read throughput by adding database nodes that serve SELECT queries in parallel, offloading the primary. A read-through cache increases the read throughput the system can serve by answering repeated reads from memory so they never reach the database. Sharding by user ID spreads read load across several nodes, so each node handles only a subset of the data and its concurrent reads. Dropping indexes forces full scans and makes reads slower, and raising every read-only query to SERIALIZABLE adds locking or conflict-tracking overhead and reduces concurrency, so neither improves read throughput.

Arrange these scaling steps in the order a web application team typically reaches them as traffic grows (earliest first). Each step depends on the one before it.#

Put these in order

Show answer

A typical web application team scales in this order: a single-server monolith, then a dedicated database server, then a load balancer with stateless application servers, and finally multiple data centers. Each step removes a constraint that blocks the next one, such as resource contention before horizontal app scaling.

Why:

The sequence starts with a single-server monolith, where the application and database share one machine. Moving the database to its own server comes next because it removes resource contention and lets several application instances reach the same data. Adding a load balancer with stateless application servers depends on that shared, independently reachable database and on session state living outside any one instance. Deploying across multiple data centers comes last because it requires a horizontally scalable, stateless application tier to replicate. This is a dependency chain rather than a universal checklist: teams often add caching or replication at different points, so those steps were deliberately left out to keep one defensible order.

Describe the cache-aside (lazy-loading) caching strategy and its main failure mode.#

Show answer

In cache-aside the application code owns the cache: on a read it checks the cache first, and on a miss it loads from the database, populates the cache, and returns. Writes go to the database and then invalidate (or update) the cache entry. Its main failure mode is the thundering herd / cache stampede — when a hot key expires, many concurrent requests all miss and hammer the database at once. Mitigate with request coalescing (single-flight), a short lock per key, or probabilistic early refresh.

Why:

Cache-aside is the most common strategy because the app stays in control and the cache only ever holds data that was actually requested. The trade-offs are an extra round trip on misses and the need to manage invalidation carefully, since stale entries linger until they expire or are explicitly evicted.

Design a URL shortener (think Bitly / TinyURL).#

Show answer

Requirements. Two operations dominate: create (write a mapping, optionally with a custom alias and expiry) and redirect (look up a code and 30x to the long URL). The system is overwhelmingly read-heavy (100:1), so the redirect path is what we optimise. I'd confirm: are custom aliases required (yes), do links expire (optional TTL), and how precise must click counts be (approximate/eventually-consistent is fine). I'd use a 302 (temporary) redirect so we keep serving redirects through our system and can still count clicks; a 301 would let browsers cache and bypass us.

Capacity. ~40 writes/sec average, ~200/sec peak; ~4K reads/sec average, ~20K peak. Storage: ~6B links over 5 years; at ~500 bytes/row (code, URL, metadata) that's ~3 TB — comfortably shardable. Keyspace: base62 with 7 characters gives 62⁷ ≈ 3.5×10¹² codes, far more than 6B, so 7 chars (often padded to a fixed length) is plenty. The hot working set (recently/ popularly accessed links) is a small fraction of 6B, so a cache of tens of GB covers the bulk of redirect traffic.

Data model. A single mapping table/collection keyed by the short code: code (PK) → long_url, created_at, expires_at, owner_id. Point lookups by primary key suit a key-value store (DynamoDB/Redis-backed) or a sharded relational table sharded by code. Click counts live separately — incrementing a counter on every redirect would put write load on the read path — so clicks are emitted as events and aggregated asynchronously.

Short-code generation. Generate a unique 64-bit id (a distributed counter handed out in ranges per server, or a Snowflake-style id) and base62-encode it to get the short code; this guarantees uniqueness with no collision checks and no hotspot from a single shared counter. Custom aliases are written directly with a uniqueness check and stored in the same table, reserving that code. (A hash-of-URL scheme is the alternative but needs collision handling and breaks idempotency for duplicate URLs.)

Read/write paths. Write: allocate id → base62 → insert mapping → return the short URL. Redirect: a load balancer / CDN fronts stateless app servers; the server does a cache-aside lookup (code → long_url) in Redis, falling back to the store on a miss and populating the cache, then returns a 302. This keeps p99 well under 100 ms for cache hits. Expiry is enforced by TTL on both the row and the cache entry. Each redirect fires a lightweight click event onto a queue (Kafka) that a consumer aggregates into per-link counts.

Bottleneck & scaling. The bottleneck is the redirect read path at peak. We scale it with cache layers (most reads never touch the store), read replicas, and sharding the mapping store by code so lookups stay single-shard. Id generation scales by handing each server an independent id range (or using Snowflake), avoiding a single global counter as a SPOF. At 10× traffic, the cache absorbs most of it; we add cache nodes and replicas and, if needed, push redirects further to the edge.

Why:

A URL shortener is the canonical warm-up design: it forces a clean separation of a heavily read-optimised redirect path from a comparatively rare write path. The two pivotal decisions are short-code generation (a base62-encoded distributed id avoids both collisions and the hotspot of a single shared counter) and caching (cache-aside on code→URL, fronted by a CDN/LB, is what meets the latency budget when reads outnumber writes 100:1). Click counting is deliberately moved off the redirect path and made asynchronous so analytics never slow a redirect. The dominant bottleneck is the redirect read path, scaled by caching, read replicas, and sharding the mapping store by code.

A team is horizontally scaling a stateless web service behind a round-robin load balancer. Some user sessions break when requests land on different instances, so they enable sticky sessions (session affinity) at the load balancer.#

Options

Show answer

Sticky sessions pin each user to one instance, which brings back per-instance session state and uneven load across the fleet. The standard fix is to move session data into a shared store such as Redis, so any instance can handle any request and the service stays horizontally elastic.

Why:

Sticky sessions (session affinity) make the load balancer route a given user's requests to the same instance. That reintroduces per-instance state, because the session lives on one server, and it skews load, because heavy or long-lived users stay concentrated on particular instances instead of being spread evenly. The standard remedy is to externalise session state into a shared distributed store such as Redis, so any instance can serve any request and the stateless design is restored. The distractors are wrong for reasons unrelated to this mechanism: TLS termination location does not depend on affinity and sticky sessions add no per-request handshakes; the load balancer still runs its health checks under affinity; and cold-start cache thundering herds are not caused by session pinning.

You are designing a globally distributed database for a social-media 'likes' counter that must keep serving reads and writes even during a network partition between data centres. You choose an AP (Available + Partition-tolerant) system per the CAP theorem.#

Options

Pick every one that applies.

Show answer

In an AP system, both sides of a network partition keep accepting writes, so the 'likes' counts can diverge until the partition heals and the replicas reconcile. CRDTs such as a G-Counter are a good fit for merging those diverged counts, since increment-based counters combine without conflict. The application layer must tolerate eventual consistency, so reads can temporarily return stale counts until replicas catch up.

Why:

This question probes deep knowledge of the CAP theorem's practical implications for scalable distributed databases. A network partition means nodes cannot communicate, so a CP system (e.g., HBase, Zookeeper) will refuse writes or reads to avoid returning stale data, sacrificing Availability. An AP system (e.g., Cassandra, DynamoDB in eventual-consistency mode) will continue serving reads and accepting writes on both sides of the partition, accepting that data may diverge and require later reconciliation. CA systems cannot exist in a distributed setting when partitions are possible — the theorem asserts you must choose between C and A when P occurs. The reconciliation mechanism for AP systems is typically vector clocks, last-write-wins, or CRDTs.

A write-heavy event-logging system uses range-based sharding on a monotonically increasing event_id to distribute data across 16 database shards. After launch, operators observe that almost all writes land on a single shard while the others sit idle.#

Show answer
  1. This is the hot shard (or write-hotspot) anti-pattern. Because event_id is monotonically increasing, new events always map to the uppermost range, which belongs to the last (highest-range) shard. All other shards only receive reads for historical data, never new writes. The range boundaries do not self-adjust, so the system is effectively single-shard for writes.

  2. Consistent hashing maps both shard nodes and keys onto a circular hash ring. Each key is owned by the first node clockwise from the key's position on the ring. When a node is added or removed, only the keys between the new node and its predecessor (approximately K/n keys, where K is total keys and n is node count) need to be remapped and migrated. All other keys remain on their current nodes. This minimal disruption property — O(K/n) remapping vs O(K) for naive modular hashing — makes it operationally far superior for elastic, dynamically scaled shard clusters.

Why:

This question tests nuanced understanding of database sharding strategies and their scalability trade-offs. Range-based sharding on a monotonically increasing key (e.g., timestamp or auto-increment ID) concentrates all writes on the last shard ('hot shard' or 'write hotspot'), making it effectively unscalable for write-heavy workloads. Consistent hashing distributes keys uniformly across nodes and, crucially, minimises key remapping when nodes are added or removed — only ~K/n keys need to move (K = total keys, n = node count). Directory-based sharding with a lookup service adds a network hop and a single point of failure unless the directory itself is highly available. Composite/hierarchical sharding (e.g., hash on user ID, then range on timestamp within shard) is common in practice but adds operational complexity.

Related interview questions

Job market

See system-design salaries and hiring demand from live job postings.

The other 93 questions

This page shows 10 and marks what you pick. That's as far as a page can go. A free account opens the other 93 and keeps every answer. What you miss comes back until it's right: after a day, then at longer gaps.

Start with this topic

Free · the whole bank · 100 answers per 30 days, each marked with written feedback

Interview booked? Practise the job ad instead

What moved, monthly

One email a month when the bulletin comes out: what moved in the markets we track, and the new question topics we published. Confirm your address to join. Unsubscribe any time.