← All problems
Dashboard
Courses
Problems
Badges
Theme
Sign inStart free
Problem 021 · Fundamentals and estimation

Design a Blogging Platform

Easy 30 min

Design a blogging platform like a small Medium. Authors write posts with text and images, readers browse a homepage of recent and popular posts, read articles and leave comments. The platform has 200,000 authors, 2 million posts and 10 million monthly readers. At peak it serves about 5,000 page views per second, and a single post can suddenly get much more traffic when it is shared widely. Authors publish around 5,000 posts a day.

Functional requirements

  • Authors create, edit and publish posts with images
  • Readers view a post and its comments
  • Browse a homepage of recent and popular posts
  • Signed-in readers comment on posts

Non-functional requirements

  • Post pages load in under 200 ms at p95
  • Published posts and comments are never lost
  • A post shared widely does not slow down the rest of the site

Constraints and scale

  • 10 million monthly readers, 5,000 page views per second at peak
  • 2 million posts, 5,000 new posts per day
  • Images up to 10 MB each

You will practise

  • Identify a read-heavy workload and cache at the right layers
  • Model posts, authors and comments in a relational database
  • Serve images and cacheable pages from a CDN
Show 2 hints
  1. A published post rarely changes. How long could its page be cached?
  2. Comments change often but posts do not. Do they need the same caching rules?

Ready to build?

Open the canvas, place your components and explain your decisions. Your draft saves automatically.

Sign in to start

Failure scenarios

  • A post goes viralA post is shared by a celebrity and receives 20,000 views per second for an hour, along with hundreds of comments per minute.

Run them from the workspace once your design is in place.