Skip to content
Preptima

Full Case Studies interview questions

Complete designs worked end to end: URL shortener, news feed, chat, ride-hailing, and more.

14 questions in System Design.

hard14

hardDesignCase Study

A file changes on one laptop and must appear on three others, one of which is offline. What travels over the network, and what happens when two of them edited it?

In file sync, the file itself does not travel. Changed content-hashed chunks go to a block store, then a small metadata commit names the version it replaced. Other laptops pull the new manifest and the chunks they lack. A concurrent edit fails that commit and becomes a conflicted copy, never a silent overwrite.

6 minmid, senior, staff
hardCase StudyDesign

A two-hour film must start playing within two seconds on a phone on 4G. What has to exist before the play button works?

Video streaming startup time is won before playback: transcode into an adaptive ladder, cut aligned segments, package a manifest, and cache the first low-bitrate segment near the viewer. At play time the system can only afford manifest fetch, licence check, first segment and decoder start. It also connects adaptive bitrate to the point an interviewer is testing.

6 minmid, senior, staff
hardDesignCase Study

Design the home feed for a social network.

Size it first: 200M daily actives opening the feed six times a day is 42k reads/s at peak, while 100M posts fanned out to 200 followers each is 231k feed writes/s, so writes dominate. Push to ordinary accounts, pull for high-follower ones, and store ids so deletes and blocks filter on read.

8 minmid, senior, staff
hardDesignCase Study

Design a URL shortener.

Clarify scale first, then size it: 100M new links a day at a 100:1 read ratio gives roughly 1.2k writes/s and 116k redirects/s, needing 7-character base62 keys. Generate keys from leased counter blocks scrambled by a bijection, serve reads from cache and CDN, and redirect with 302 rather than 301.

6 minmid, senior, staff
hardCase StudyDesign

A rider requests a car and forty drivers are within range. Which one do you pick, and how long do you have to decide?

Ride matching system design should rank drivers by estimated pickup time and market impact, not straight-line distance. Offer the ride under a short soft lock, use a small batching window when it improves assignment quality, and keep the rider wait within a few seconds. Use this dispatch answer to show the decision, trade-off, and evidence rather than a memorised definition.

6 minmid, senior, staff
hardScenarioDesign

How do you design a global skill-based matchmaking system that prevents grandmasters from stomping novices without making them wait in a 20-minute queue?

An authoritative breakdown of horizontal matchmaking services, constraint relaxation algorithms, and distributed locking for ticket-based lobbies. Use this matchmaking answer to show the decision, trade-off, and evidence rather than a memorised definition. It also connects SBMM to the point an interviewer is testing.

3 minsenior, staff
hardCase StudyDesign

Your origin is in one region and readers are worldwide. What do you cache, and what happens the moment you must invalidate it?

CDN caching for global reads works when cacheable bytes are separated from personalised fragments. Use content-addressed assets, tag-based purges for pages that must change, and plan for purge storms because invalidation sends cold traffic back to the one origin region. It also connects http caching to the point an interviewer is testing.

6 minmid, senior, staff