Design a To-Do Sync App

To-do app inspired by Todoist and Google Tasks: lists sync across a person's devices using sync tokens, reads come from a cache, and pushes and reminders are sent in the background.

Functional requirements

  • Show a person's lists and tasks, and let them add, edit, reorder and complete tasks
  • Sync every change to all of the person's devices using a sync token, so a device only fetches what changed since it last synced
  • Work offline: changes made without a connection are queued on the device and merged when it reconnects
  • Resolve a conflict when two devices change the same task (for example last write wins per field)
  • Send a reminder at the due time to the person's devices
  • Limit how often one client can sync, so a buggy app cannot hammer the service

Non-functional requirements

  • Sync request < 100ms p99 when nothing changed, served from the task cache
  • A change made on one device shows on the others within 5 seconds
  • Handle 4K sync requests per second at peak, with about 800 task changes per second
  • No saved task is ever lost (99.99% durability); a sync that fails halfway can be retried safely
  • Reminders are sent within 1 minute of their due time, and exactly once per task
  • Scale to 10M users, with each person's tasks living together for cheap sync queries
  • 99.9% availability; the app keeps working offline when the service is down

How the design evolves

Stage 1: Query the Database for Every Sync

See why querying the database on every sync does not scale.

What was missing: A sync should not read all of a person's tasks from the database every time.

Why that's risky: Apps sync every few seconds, so the database re-reads the same unchanged lists thousands of times per second.

What gets added: One server that reads a person's tasks from the database on every sync and saves each change.

Trade-offs: Always current, but wasteful.

Stage 2: Sync Service and Cache

Separate syncing from saving and serve syncs from memory.

What was missing: Reads and writes share one path.

Why that's risky: Two devices can edit the same task, and an offline device can resend a change, so the system needs a conflict rule and a way to apply each change once.

What gets added: A sync service that returns only what changed since the device's last sync token, served from a per-user cache; a task service that saves changes; and a task database as source of truth.

Trade-offs: Last write wins is simple but can lose an edit; version checks catch the conflict but need client support. Todoist's sync API uses sync tokens and per-command ids for the same reasons.

Stage 3: Push Changes and Reminders in the Background

Tell other devices about a change instead of making them poll, and send reminders off the request path.

What was missing: Other devices only learn about a change when they next poll, and reminders are not sent.

Why that's risky: Without push, every device polls every few seconds, which wastes battery and server capacity for lists that rarely change.

What gets added: Every saved change puts a job on a queue; workers push the change to the person's other devices, send due reminders and refresh the cache.

Trade-offs: Push makes changes appear in seconds, in exchange for running a notification path that can lag behind.

Stage 4: Limits and Monitoring

Protect the API from runaway clients and watch sync health.

What was missing: A buggy client stuck in a sync loop can overload the API, and nothing shows sync health.

Why that's risky: One misbehaving app version can send thousands of syncs per second from every install at once.

What gets added: A rate limiter per account and device, and monitoring of sync latency, push delay and queue depth.

Trade-offs: Limits can slow a legitimate bulk import, so writes get a higher allowance than repeated full syncs.

PRISM
System Design Interview
Round 1 of 4 · Architecture Design · 60:00 remaining
PRISM logo PRISM logo
Problems
AI Interview
Interview Challenges
Build & Stress Test NEW
System Architectures
Design & Fix NEW
Interactive Roadmap
Problems
Today's mission
Notifications
    Theme
    Pricing Community NEW Send feedback Report a problem NEW
    Sign in
    Theme
    Community NEW Send feedback Report a problem NEW
    All problems
    Phase
    Build & Stress Test
    Phase 01: Thinking in Systems
    Upcoming

    Components

    User
    CDN
    Load Balancer
    Server
    Cache
    Database
    Blob Storage
    Search Index
    Queue
    Worker
    Rate Limiter
    Service
    API Gateway
    Reverse Proxy
    WebSocket Server
    Third-party API

    Inspector

    Notes
    Use clear names so your design intent is easy to understand.
    Good
    Name by business meaning
    "Order API", "Restaurant Service"
    Avoid
    Generic names = zero signal
    "Server 1", "API", "Queue"
    A short description for each component makes feedback much better.
    100%
    Start by identifying:
    • Users & entry points
    • APIs & services
    • Databases & storage
    • Traffic flow & scale

    Round 1 of 4 Architecture Design

    Run a simulation to see results.

    Time Remaining
    60:00
    System Design Interview

    What are the core functional requirements?
    What are the key non-functional constraints?

    Questions

    Start Evaluation to unlock questions.

    Test yourself like it's the real thing.

    Interview prep guide
    Architecture Design
    Draw your system on the canvas. Define components, connections, and data flow.
    FR & NFR Requirements
    Answer functional and non-functional requirement questions about your design.
    MCQ Round
    Multiple choice questions testing your depth on the chosen system.
    Tradeoff Analysis
    Justify your design decisions and defend your architectural tradeoffs.
    AI interviews left 0left
    This week 0 / 0
    Used today 0 / 0

    Choose a Problem
    No problem selected
    • 30 min
    • 45 min
    • 60 min
    Round 2 of 4
    MCQ Round
    Answer multiple-choice questions based on your design.

    Exit Interview?

    You're in the middle of an interview session. Leaving now will end your current attempt.

    Your progress will be saved.

    Open a saved design

    Select a design to load into the canvas.

    My Evaluations

    Your past evaluation sessions

    Here’s a simple request flow that follows the expected layer order.

    External User
    →
    Edge CDN → API Gateway → Load Balancer
    →
    Compute App Servers / Services
    →
    DataAccess Cache
    →
    Storage Database / Search Index
    →
    Async Queue → Worker

    Tip: keep arrows moving forward through layers (Edge → Compute → Storage). Avoid sending storage back to compute.

    Evaluation Instructions

    Read the rules carefully before starting. The test auto-submits on refresh.

    Before you start

    • Build your architecture on the canvas. The timer starts when you click Start Evaluation.
    • Don't forget to answer Functional Requirement and Non Functional Requirements.
    • When satisfied with your design, click Next to lock it and view the questions.
    • Please answer final step questions to complete the evaluation.

    Dos

    • Do read each question carefully before answering.
    • Do include required components to maximize component coverage.
    • Do save a copy of your design if you want to keep it before submission.

    Don'ts

    • Don't refresh or close the tab during an active evaluation — this will auto-submit your answers.
    • Don't switch app modes or open another tab while the evaluation is running.
    • Don't attempt to edit the design after clicking Next; the workspace will be locked.

    All the best!!

    Confirm

    Input

    Notice

    Evaluation Report
    Report a problem

    Evaluation Complete

    Generating Your Report

    Hang tight — our AI is evaluating your design…

    Did you know?

    Loading…

    Share feedback

    Tell us what worked well and what we can improve.

    Let's personalize this

    Answer a couple of quick questions so we can tailor your journey and missions.

    Your welcome gift: of Full PRISM Access

    Your Pro access starts as soon as you press Start my journey.

    SYSTEM BRIEF

    System Constraints

    What the system must do — every item is a user-facing behaviour your architecture must support.

      ↑ Engineering Constraints

      These are the failure modes you must design against — latency SLAs, durability targets, traffic ceilings.

        ⇆ Architecture Constraints

        Core Concepts to Master

        Your Journey
        PHASE – –
        0 / 0 0%
        0
        Mock Interview Checklist

        Pick a topic to start

        Explore concept overviews, real-system examples, key tradeoffs, and interview talking points for each roadmap section.

        Phase Mastered

        You've conquered this phase. These are the skills you now own:

          +500 XP

          Company Interview Paths

          Progress Summary