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 →
- When would you choose vertical scaling over horizontal scaling?
Choose vertical scaling when the system is small, stateful, or hard to split, such as a single relational database. It is simple and fast to do, but it has a hardware ceiling and leaves one machine as a single point of failure.
BeginnerQuick answer1 min read - Which HTTP methods are safe and which are idempotent?
Safe methods (GET, HEAD, OPTIONS) don't change server state. Idempotent methods (GET, PUT, DELETE and the safe ones) give the same result when repeated. POST is neither, and PATCH is not guaranteed idempotent.
BeginnerQuick answer1 min read - Which HTTP status codes should every API developer know?
Know the families: 2xx success (200, 201, 204), 3xx redirect (301, 304), 4xx client error (400, 401, 403, 404, 409, 429), 5xx server error (500, 502, 503, 504). The code tells clients whether retrying can help.
BeginnerQuick answer1 min read - Why are stateless services easier to scale horizontally?
A stateless server keeps no per-user data in its own memory, so any server can handle any request. You can add, remove or replace servers freely behind a load balancer, with no sticky routing.
BeginnerQuick answer1 min read - Why do engineers track p95 and p99 latency instead of the average?
Averages hide slow outliers. p99 means 99% of requests were faster than this value, so it shows what your unluckiest users feel, which is what drives complaints and timeouts.
BeginnerQuick answer1 min read - Why does my useEffect run twice in development?
In Strict Mode, React 18 and later deliberately mounts, unmounts and remounts each component once in development to check that effects clean up properly. It does not happen in production.
BeginnerQuick answer1 min read