Interview Q&A / System Design

INTERVIEW Q&A · 70 QUESTIONS

System Design interview questions

Caching, scaling, databases and classic design problems for beginners.

  1. What is the CAP theorem, in simple words?

    The CAP theorem says that when a network partition splits a distributed system, it must choose between consistency (every read sees the latest write or gets an error) and availability (every request gets a non-error response, possibly stale). Partitions can't be ruled out, so the real choice is CP or AP during a partition.

    IntermediateIn-depth4 min read
  2. In CAP, why is partition tolerance not really a choice?

    Network partitions happen in any real distributed system, so you cannot opt out of P. The real decision is what to do during a partition: refuse some requests to stay consistent (CP) or answer with possibly stale data (AP).

    IntermediateQuick answer1 min read
  3. What is the difference between synchronous and asynchronous replication?

    Synchronous replication makes the leader wait for replicas to confirm before acknowledging a write, so no acknowledged write is lost but writes are slower. Asynchronous replies immediately and replicates later, which is faster but can lose recent writes.

    IntermediateQuick answer1 min read