Caching system design problems
10 problems where caching is a core concern. Draw the architecture, explain your choices, and see how an interviewer would score it.
| Status | Problem | Topics | Difficulty | Best | Lists |
|---|---|---|---|---|---|
| Design a URL shortener Build a service like bit.ly that turns long URLs into short links and redirects visitors to the original address. | HashingCachingRead-heavy | Easy | |||
| Design Pastebin Let users paste text, get a short link and share it, like Pastebin or GitHub Gist. | Object storageCachingRead-heavy | Easy | |||
| Design a gaming leaderboard Rank millions of players by score in real time and show each player their position, like a mobile game’s global leaderboard. | Sorted setsCachingReal-time | Easy | |||
| Design a weather API Serve current weather and forecasts for any location to millions of apps, using data bought from upstream providers. | CachingThird-party dataRead-heavy | Easy | |||
| Design a feature flag service Let teams turn features on or off and roll them out to a percentage of users without deploying, like LaunchDarkly. | ConfigurationCachingPush | Easy | |||
| Scenario: the database is at 95% CPU A product catalogue API runs on one MySQL server. Traffic has grown to 30,000 reads a second, database CPU sits at 95% and p99 latency has climbed from 50 ms to 2 seconds. Bring latency back down, and keep it down as traffic doubles. | ScenarioRead scalingCaching | Easy | |||
| Design a social news feed Show each user a timeline of recent posts from the people they follow, like Twitter or Instagram. | Fan-outQueuesCaching | Medium | |||
| Design search autocomplete Suggest the top completions as a user types into a search box, like Google’s autocomplete. | TriesCachingRead-heavy | Medium | |||
| Design Reddit Communities where users post links and text, vote on them and discuss in threaded comments, like Reddit. | RankingVotingCaching | Medium | |||
| Design a Q&A site Let people ask questions, post answers, vote on the best ones and find answers through search, like Stack Overflow. | SearchVotingCaching | Medium |