Design Google Calendar

Calendar service inspired by Google Calendar and the iCalendar/CalDAV standards: recurrence rules expanded per view window, invites and RSVPs, scheduled reminders, incremental sync with sync tokens, and free/busy scheduling. A teaching design.

Functional requirements

  • Create, update, delete calendar events with title, description, time, location, recurrence rule
  • Invite attendees to events; attendees can accept, decline, or mark maybe
  • Support recurring events (daily, weekly, monthly, custom RRULE)
  • Send reminders via email and push notification before event start time
  • View calendar for a day, week, or month — show all events for the user
  • Share calendars with read-only or edit permissions
  • Free/busy lookup — given a list of users, find overlapping available slots

Non-functional requirements

  • Calendar view load time < 200ms p99
  • Reminder delivery within ±30 seconds of scheduled time
  • 99.99% uptime — calendar is a productivity-critical service
  • Eventual consistency acceptable for invite status updates (< 2s)
  • Support 1 billion users; peak 120K RPS on calendar view endpoint

How the design evolves

Stage 1: Single Server, One Row per Occurrence

See why copying every occurrence of a recurring event breaks down.

What was missing: Nothing yet.

Why that's risky: A daily stand-up 'forever' needs endless rows, and changing its time means rewriting all of them; at the 9 am peak one database serves every view.

What gets added: One server that saves each occurrence of a recurring event as its own row and reads them back for the week view.

Trade-offs: Simple reads, but writes and storage explode with recurrence.

Stage 2: Recurrence Rules, Not Copies

Store each series once and expand it only for the window being viewed.

What was missing: Recurring events were copied into a row per occurrence.

Why that's risky: Every view still expands rules from the primary database, and the morning peak is all reads.

What gets added: An event service that saves a series once as a recurrence rule (RRULE) with its time zone plus exception rows for edited or cancelled occurrences, and a view service that expands rules only for the requested day, week or month.

Trade-offs: Reads do a little computation (expanding rules) so writes and storage stay tiny.

Stage 3: Fast Views from a Cache and Replica

Serve the 9 am rush of calendar views without loading the primary.

What was missing: Every view expanded rules from the primary database.

Why that's risky: Meetings with other people don't exist yet: no invites or RSVPs.

What gets added: A view cache of expanded occurrences per calendar and window, invalidated when the calendar changes, and a read replica behind it.

Trade-offs: A view may lag an edit by a moment until the cache is invalidated.

Stage 4: Invites and RSVPs

Put a meeting on every attendee's calendar and track their answers.

What was missing: No way to invite people or record their answers.

Why that's risky: Nobody gets reminded before a meeting starts.

What gets added: An invite service that adds attendees, records RSVPs and places the event on each attendee's calendar, plus an email queue and sender that send invitations with .ics attachments for people on other calendar systems.

Trade-offs: Attendees see the invite on their calendar at once; the email arrives seconds later.

Stage 5: Reminders on a Schedule

Fire reminders on time for every occurrence, including recurring ones.

What was missing: Nothing sent reminders.

Why that's risky: Phones and desktop apps re-download whole calendars to stay in sync, and scheduling across people needs everyone's free time.

What gets added: A reminder schedule of delayed jobs keyed by fire time (upcoming occurrences are expanded a day ahead), and reminder senders that push and email each attendee when a job comes due.

Trade-offs: Scheduling a day ahead means a change made seconds before a reminder must also update its job.

Stage 6: Sync Tokens, Free/Busy and Protection

Sync devices incrementally, find common free time, and protect the service.

What was missing: Devices re-downloaded whole calendars, finding a meeting time meant opening everyone's calendar, and nothing limited buggy clients.

Why that's risky: Remaining risk is regional: calendars must be served from a nearby region and fail over.

What gets added: A per-calendar change log with sync tokens so apps fetch only what changed, a free/busy service and index of busy blocks for scheduling, a rate limiter, and monitoring of view latency, reminder lateness and sync lag.

Trade-offs: The change log costs an extra write per change in exchange for tiny sync responses.

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
System Design Guides Interview Prep Guide
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.

    EVALUATE MODE

    Test yourself like it's the real thing.

    A structured 4-module evaluation that mirrors how top companies assess system design candidates.

    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 Report Generated
    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