Interview Q&A / System Design

INTERVIEW Q&A · 70 QUESTIONS

System Design interview questions

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

  1. How do you choose between a SQL and a NoSQL database?

    Choose SQL when data is relational, you need joins, transactions and flexible queries, and the schema is fairly stable. Choose NoSQL when you need a flexible schema, very high scale for simple access patterns known in advance, or a data model like documents, key-value or graphs. Many systems use both.

    BeginnerIn-depth4 min read
  2. How does leader-follower database replication work?

    All writes go to one leader, which streams its changes to follower replicas. Followers serve reads, which spreads read load and gives a standby copy if the leader fails, but they may lag behind.

    BeginnerQuick answer1 min read
  3. What is the difference between sharding and partitioning?

    Partitioning splits a big table into smaller parts, often inside one database. Sharding is partitioning where the parts live on different servers, so both data and load are spread across machines.

    BeginnerQuick answer1 min read