SystemKit

Design a workout activity feed for a fitness app

Apply the news feed chapter to workouts, where a few athletes have huge followings, uploads arrive late, and a route map can reveal where someone lives.

The brief

Athletes record a run or ride, and the app uploads it when it next has a connection, sometimes hours later. Followers see a card with a route map, distance, and pace in a home feed. A few popular athletes have about a million followers. Each activity is visible to everyone, followers only, or only the athlete, and that setting can change later. Keep comments, segments, leaderboards, and ranking outside this exercise.

  • 20 million registered users, 5 million active each day. Active users open the feed 4 times a day and load 2 pages per open. Peak traffic is 3 times the daily average. Use decimal units and 86,400 seconds per day.
  • 1 million activities a day come from ordinary athletes, who average 150 followers. Separately, 100 popular athletes average 1 million followers and post twice a day.
  • Followers of popular athletes are as active as anyone else, so about 25% open the app on a given day. The inbox store is sized for 10,000 writes per second.
  • Each activity stores a 72 KB GPS track and 200 KB of rendered map images. An inbox keeps at most 500 entries of 16 bytes each.
  • 95% of activities should reach followers’ feeds within 60 seconds of upload. Setting an activity to “only me” must stop new reads, including its map image, within 60 seconds.

Reading a design isn’t the same as producing one under a clock. Try it timed: the requirement change stays hidden until partway through.

Loading your draft…

State your scope. Estimate feed page reads, ordinary fanout writes, what pushing popular athletes’ posts would cost, how long one popular post takes to push, inbox storage, and 30 days of activity storage. Keep units visible.

0 / 4,000 characters

Name the components and what each stores. Trace one late upload from the phone to a follower’s feed, and one feed page that includes a popular athlete. State which timestamp orders the feed and what the cursor contains.

0 / 4,000 characters

Pick a likely bottleneck and the signal that would reveal it. Explain what a follower sees if fanout falls behind or the inbox store fails, and how a stale inbox entry is kept from returning a private activity.

0 / 4,000 characters

Respond to the safety review below. Explain how the switch takes effect in 60 seconds without rewriting every inbox, how map images and old links comply, and one cost of your approach.

The requirement changesA safety review asks for a private-account switch. When an athlete turns it on, all of their past activities, perhaps 3,000 of them, must disappear from everyone but approved followers within 60 seconds, including map images. The review also wants the first and last 500 meters of every route hidden from anyone but the athlete. What changes?

0 / 4,000 characters

Write an initial response in all four sections to unlock the checklist and two worked approaches.