← All problems
Dashboard
Courses
Problems
Badges
Theme
Sign inStart free
Problem 014 · APIs and application architecture

Design a Task Tracker API

Easy 30 min

Design the backend API for a task tracker used by web and mobile apps. Users sign in, create lists, add tasks with due dates and labels, tick them off and share a list with a few teammates. The app has 3 million registered users and 500,000 daily active users. At peak the API receives about 3,000 requests per second, mostly reads of a user's lists and tasks. Each list can hold thousands of tasks, so the API must page through results rather than return everything at once.

Functional requirements

  • Create, read, update and delete lists and tasks
  • Page through tasks in a list, filtered by status or due date
  • Share a list with other users who can view or edit it
  • Only owners and invited members can see a list

Non-functional requirements

  • API responses under 200 ms at p95
  • No lost updates when two people edit the same task
  • 99.9% availability

Constraints and scale

  • 500,000 daily active users
  • 3,000 requests per second at peak, about 80% reads
  • Up to 5,000 tasks in one list

You will practise

  • Design clean REST resources, status codes and cursor-based pagination
  • Keep the API tier stateless so it scales horizontally
  • Model relational data with indexes that match the access patterns
Show 2 hints
  1. Offset pagination slows down on page 200. What could the client send back instead of a page number?
  2. Where does the session or token live if any API instance can serve any request?

Ready to build?

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

Sign in to start

Failure scenarios

  • Two teammates edit the same taskTwo people open the same task. One changes the due date, the other renames it a second later. The first change disappears.

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