Bird
Raised Fist0

Common Mistakes Candidates Make in System Design Interviews

HLDmediumInterview freq: high
Choose your preparation mode4 modes available
▶
Request Trace
Step 1/5
API Gateway

Receives client request and validates it

API Gateway accepts HTTP request and performs auth checks

Protocol:HTTP
BeforeClient request not yet received by system
AfterRequest validated and forwarded to Kafka Cluster
Kafka Cluster

Publishes request event to topic

Kafka stores request event durably for downstream processing

Protocol:Kafka Publish
BeforeRequest event not yet persisted in Kafka
AfterRequest event durably stored in Kafka topic partition
Cassandra DB

Reads/writes persistent data related to request

Cassandra executes CQL queries to update or fetch data

Protocol:CQL Query
BeforeRequest data not yet updated in Cassandra
AfterRequest data updated or retrieved from Cassandra
Redis Cache

Caches frequently accessed data for quick retrieval

Redis GET/SET commands used to reduce DB load

Protocol:Redis GET/SET
BeforeCache miss or stale data before Redis access
AfterCache updated with fresh data for future requests
Notification Service

Sends notification to user about request status

Push notification sent asynchronously after processing

Protocol:Internal API call
BeforeUser unaware of request processing status
AfterUser receives notification about request outcome
🏗️
Architecture Diagram
Architecture Diagram
┌───────────────┐
│  API Gateway  │
└───────┬───────┘
        │ HTTP Req
        ▼
┌───────────────┐
│ Kafka Cluster │
└───────┬───────┘
        │ Kafka Pub
        ▼
┌───────────────┐
│ Cassandra DB  │
└───────┬───────┘
        │ CQL Query
        ▼
┌───────────────┐
│ Redis Cache   │
└───────┬───────┘
        │ Redis GET/SET
        ▼
┌───────────────────────┐
│ Notification Service  │
└───────────────────────┘

This architecture illustrates a common pattern in system design interviews where a client request flows vertically through an API Gateway, which validates and forwards it to a Kafka Cluster for durable event storage. Kafka decouples the request ingestion from downstream processing. Cassandra DB provides scalable persistent storage for request data, while Redis Cache accelerates data retrieval by caching hot data. Finally, the Notification Service asynchronously informs users of request status. Candidates often misunderstand the role of Kafka as just a queue without durability or confuse Redis as a primary store rather than a cache. This diagram clarifies component roles and protocols, emphasizing the vertical flow and separation of concerns.

Primary Focus

✓

Practice

(1/5)
1. In a Raft consensus system, at Step 4, the Leader sends AppendEntries RPCs to followers. What happens if a follower's log is inconsistent at this step?
easy
A. The follower immediately accepts the entries and overwrites conflicting logs
B. The follower rejects the AppendEntries, prompting the leader to decrement the nextIndex and retry
C. The follower crashes and restarts to recover the log state
D. The follower ignores the AppendEntries and waits for the next heartbeat

Solution

  1. Step 1: Understand Raft's log replication mechanism

    If a follower's log is inconsistent with the leader's, it rejects the AppendEntries RPC to signal a mismatch.
  2. Step 2: Leader's response to rejection

    The leader decrements the nextIndex for that follower and retries AppendEntries until logs match.
  3. Final Answer:

    Option B -> Option B
  4. Quick Check:

    Follower rejects inconsistent logs -> leader retries with decremented nextIndex [check]
Hint: Follower rejects mismatched logs; leader retries with lower index [check]
Common Mistakes:
2. In a storage tiering system, at Step 4 the Data Migration Worker checks the access frequency metadata for a data block. What action does it take if the access frequency falls below the warm tier threshold?
easy
A. Immediately deletes the data block to free space
B. Promotes the data block to hot storage for faster access
C. Moves the data block from warm storage to cold storage tier
D. Archives the data block to tape storage without metadata update

Solution

  1. Step 1: Understand migration triggers

    Data Migration Worker uses access frequency to decide tier movement; low frequency triggers move to colder tier.
  2. Step 2: Identify correct tier movement

    Data with low access frequency moves from warm to cold storage, not deletion or promotion.
  3. Final Answer:

    Option C -> Option C
  4. Quick Check:

    Low access frequency -> warm to cold migration [check]
Hint: Low access frequency -> move down tiers, not delete [check]
Common Mistakes:
3. Without the distributed metadata service, what exactly breaks in the blob store's object retrieval process?
medium
A. Object retrieval requests block indefinitely waiting for metadata resolution
B. Clients receive errors because object locations and versions cannot be resolved
C. Clients can still retrieve blobs but with stale metadata versions
D. Blobs are retrieved but data integrity checks fail silently

Solution

  1. Step 1: Trace retrieval dependency on metadata service

    The metadata service provides object location and version info; without it, retrieval cannot resolve where to fetch data.
  2. Step 2: Eliminate other options

    Stale metadata retrieval is impossible without metadata service; blocking indefinitely is unlikely as client errors occur; silent integrity failures require data access, which fails first.
  3. Final Answer:

    Option B -> Option B
  4. Quick Check:

    Metadata service absence causes unresolved object location errors [check]
Hint: No metadata service -> no object location resolution -> retrieval errors [check]
Common Mistakes:
4. If the health check module fails to run, what is the exact failure observed in the load balancer's routing behavior?
medium
A. Load balancer reroutes traffic randomly ignoring server health
B. Load balancer blocks all traffic until health checks resume
C. Load balancer routes only to a cached subset of servers marked healthy previously
D. Load balancer continues routing to all servers, including unhealthy ones, causing client errors

Solution

  1. Step 1: Understand health check module role

    Health checks detect unhealthy servers; without them, no updates occur to remove bad servers.
  2. Step 2: Trace routing behavior without health checks

    Load balancer routes to all servers indiscriminately, including unhealthy ones, causing client errors.
  3. Final Answer:

    Option D -> Option D
  4. Quick Check:

    No health checks -> no removal of unhealthy servers -> client errors [check]
Hint: No health checks means no unhealthy server removal [check]
Common Mistakes:
5. At 10x scale, which component of the Snowflake ID generation system is most likely to become the bottleneck first, and why?
hard
A. The timestamp source, because clock synchronization across machines becomes impossible at scale.
B. The network bandwidth, because ID generation requires frequent coordination between machines.
C. The sequence number, because generating more than its max IDs per millisecond causes blocking delays.
D. The machine ID allocation, because limited machine ID bits cause ID collisions as machines increase.

Solution

  1. Step 1: Analyze timestamp and network constraints

    Timestamp synchronization (A) is challenging but tolerable with NTP; network coordination (D) is minimal as IDs are generated locally.
  2. Step 2: Evaluate sequence number limits

    Sequence number (B) limits per millisecond can cause blocking but can be mitigated by load balancing or sharding.
  3. Step 3: Identify machine ID allocation bottleneck

    Machine ID bits are fixed (e.g., 10 bits), limiting the number of unique machines. At 10x scale, running out of unique machine IDs causes collisions or requires complex reallocation.
  4. Final Answer:

    Option D -> Option D
  5. Quick Check:

    Fixed machine ID bits limit scale -> collisions or reconfiguration needed [check]
Hint: Fixed machine ID bits limit scale before sequence or timestamp issues [OK]
Common Mistakes:
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard