Q&A platform inspired by Quora's published architecture: sharded MySQL content behind Memcached, CDN-cached pages for search visitors, duplicate-question suggestions, a ranked feed from followed topics and people, sharded vote counters and quality classification. A teaching design.
See why building every page and feed with queries can't serve a read-heavy site.
What was missing: Nothing yet.
Why that's risky: Popular question pages are rebuilt on every view, feeds join across many topics, and one database carries everything.
What gets added: One server storing questions and answers and building every page and feed with SQL.
Trade-offs: Always fresh, at a high cost per read.
Serve the read-heavy traffic from cache and split content across databases.
What was missing: Every view rebuilt pages from one database.
Why that's risky: People keep asking questions that already exist, splitting the answers.
What gets added: A question and answer service rendering pages from a Memcached page cache, content sharded by question id across MySQL databases, a simple feed of the newest items in chosen topics, and a CDN serving cached pages to logged-out readers from search engines.
Trade-offs: Cached pages can lag a new answer by a moment until they're invalidated.
Help readers find questions and stop duplicates at the moment of asking.
What was missing: No search, and duplicates were common.
Why that's risky: Feeds are just newest-first by topic, so they fill with low-quality items.
What gets added: A content event stream feeding a search indexer, a search index over titles, topics and snippets, and a search service that suggests existing questions while someone types a new one.
Trade-offs: Duplicate suggestions are best-effort; moderators can still merge questions later.
Show each reader the most interesting items from what they follow.
What was missing: The feed was a newest-first list.
Why that's risky: Without votes, ranking has little signal about which items are good, and spam goes unchecked.
What gets added: A follow graph of topics and people, and a feed service that gathers candidates from what the reader follows and ranks them by predicted interest, item quality and freshness, cached per reader.
Trade-offs: Ranked feeds are less predictable than time order but far more engaging.
Surface the best items and remove spam.
What was missing: No voting, no ordering of items by quality, no spam control.
Why that's risky: Spammers and vote rings can still post and vote as fast as they like.
What gets added: A vote service writing to sharded vote counters, an item ranker that reorders each page by votes, writer credibility and quality, and a quality and spam classifier that collapses weak items and removes spam.
Trade-offs: Vote counts shown are slightly delayed sums of counter shards.
Slow down abuse and watch the site.
What was missing: No limits on posting or voting and no monitoring.
Why that's risky: Remaining risk is regional: content should be replicated to a second region.
What gets added: Rate limits on posting and voting per account and IP, and monitoring of page latency, cache hit rate, indexing lag and spam rate.
Trade-offs: Limits can slow a prolific writer; trusted accounts get higher limits.
Use a mix of quality signals (votes, author trust, freshness) with offline feature pipelines and online scoring; cache the ranked list.
Emit events for changes; indexer applies tombstones; periodic reindex jobs reconcile divergence.
You're in the middle of an interview session. Leaving now will end your current attempt.
Explore concept overviews, real-system examples, key tradeoffs, and interview talking points for each roadmap section.
You've conquered this phase. These are the skills you now own: