KatInterview

Build a Multi-User Calendar with Recurring Events and Reminders

System DesignModel answer
MediumModel answerSystem Designsystem-designschedulingdatabases

Last updated

Design the backend for a calendar platform that handles event creation, recurrence rules, shared access permissions, and scalable notification delivery.

You're designing the backend architecture for a calendar platform that multiple users can access simultaneously. The system needs to support personal and team calendars with sophisticated scheduling features.

Core Capabilities

Your design must support:

  1. Event management: Users create, modify, and remove calendar entries with title, time range, timezone, and participant list
  2. Repeating patterns: Events can recur on schedules like "every Tuesday at 2 PM" or "first Monday of each month"
  3. Access control: Calendar owners grant different permission levels to other users (view-only, can-edit, full-control)
  4. Advance notifications: The system delivers alerts to users before their events begin

Performance Targets

  • Availability: Calendar viewing must remain operational even during partial outages
  • Response time: Loading a month view should complete in under 200ms
  • Recurrence complexity: Support industry-standard recurrence syntax (iCalendar RRULE format)

What to Cover

  1. Storage schema: How will you represent events in the database? For repeating events, will you store each occurrence separately or save the pattern and generate instances on demand?
  2. System components: Sketch the services, data stores, and communication paths
  3. Collision handling: How do you prevent double-booking shared resources like conference rooms?
  4. Notification infrastructure: Describe an approach that scales to millions of daily alerts, especially when most events cluster at common start times (:00 and :30 past the hour)

Focus on the technical decisions that make this system work reliably at scale.

Hints

Hint 1

Think about the read-to-write ratio for calendars and how that influences caching strategy

Hint 2

Materializing recurring event instances within a rolling time window balances query speed against storage cost

Hint 3

Pre-computing reminder fire times into bucketed rows avoids scanning the entire event table every minute