Capacity Planning
Design the core of a location-based dating app: a user sees a feed of nearby candidate profiles, swipes like or pass on each one, and when two people like each other they match and can start talking.
In scope: the candidate feed, recording swipes, and detecting mutual matches. Post-match messaging is the <a href="/problems/chatapp/solution" target="_blank">Chat / Messenger</a> case, treated as a separate service downstream of a match. Profile photo storage and delivery are out of scope — assume large blobs served behind a <a href="/fundamentals/cdn" target="_blank">CDN</a>. Ranking quality, payments, and identity verification are also out of scope.
Scale and usage:
2.1 Writes: the swipe firehose
Assume about 50 million daily active users, each swiping roughly 100 profiles a day. That's 50M × 100 = 5,000M, or 5 billion swipes a day. A day holds 24 × 3,600 = 86,400 seconds, so the average write rate is 5×10⁹ ÷ 86,400 ≈ 58,000 swipes a second. Evening peaks run several times higher — at a 3× multiplier that's roughly 58,000 × 3 ≈ 174,000 writes a second.
2.2 Reads: the candidate feed
Each user pulls a fresh batch of candidates some tens of times a day (for example, 20). That's 50M × 20 = 1,000M, or 1 billion feed reads a day, averaging around 11,600 reads a second. Reads run at roughly a fifth of the write rate — the reverse of a typical read-heavy CRUD system.
2.3 Storage and the seen filter
Each swipe row is tiny: swiper id, swipee id, direction, timestamp — about 32 bytes. At 5 billion swipes a day that's roughly 160 GB of raw swipe data daily, before indexes. For the seen filter, a Bloom filter sized for a 1% false-positive rate costs about 9.6 bits per entry (from the standard formula bits/entry ≈ -log₂(p) / ln 2, evaluated at p = 0.01) — a fraction of the roughly 64 bits an exact per-entry record would need. A match needs both users to like each other, so matches are a small fraction of swipes — the read side (matches list, notifications) never comes close to swipe-write volume.
Key idea. The system must absorb roughly 58,000 swipe writes a second on average and 174,000 at peak — several times the candidate-feed read rate. Matches are a trickle by comparison; size for the writes.
What a strong answer sounds like
State the decision, connect it to a requirement, and name the tradeoff. Ask the interviewer for any product facts you need (users, usage, scale, targets) — they will answer. Keep the design focused on the workload.
The AI interviewer asks about this part of Design Tinder. The interviewer guides you through topics one by one.