Interview Q&A / System Design
System Design interview questions
Caching, scaling, databases and classic design problems for beginners.
Prefer rapid revision? Practise System Design short interview answers →
- How do you choose a good shard key?
A good shard key has high cardinality, spreads data and traffic evenly, and matches the most common query so requests hit one shard. Avoid keys that grow monotonically or are skewed, like timestamps or country.
IntermediateQuick answer1 min read - How do you version a public API without breaking existing clients?
Put the version in the URL (/v1/) or a header, never change the meaning of existing fields, add new fields as optional, and announce deprecations with a long sunset period. Prefer additive changes so versions are rarely needed.
IntermediateQuick answer1 min read