Dashboard/System design/43. Design Google Calendar

SYSTEM DESIGN · LESSON 43 OF 52 · 14 MIN VIDEO · 2 TOPICS

Design Google Calendar

Module Progress (0 / 2 Lessons Completed)0%
System design Track (0 / 52 Modules) · Overall 0/80 (0%)0%
⌁

Narrated HD Video Lesson (14 min) · Pro

Lesson Overview + Section #01 + RESHADED Checklist + Quiz #1 are unlocked free below (no login required). Unlock all 80 HD video lessons and deep-dive sections — or watch our two free sample video lessons first.

0% READSec 01/02 · System Design: Google Calendar
SYSTEM DESIGN VIDEO LESSON & GUIDE

Design Google Calendar

Designing a shared global calendar like Google Calendar (100M DAU, 1B calendar views/day, 35,000 RPS peak reads) looks deceptively like simple CRUD until cross-timezone scheduling, unbounded recurring series (RRULE), 5,000-attendee company meetings, conflict-free room bookings, and top-of-the-hour reminder storms (167,000 reminders/s) intersect. L4-L6 interviewers evaluate how you separate UTC instants from IANA local-timezone recurrence rules across Daylight Saving Time (DST), shard relational storage by calendar_id while fanning out invitations asynchronously, prevent physical room double-booking via transactional interval checks, and synchronize multi-device clients using monotonic delta tokens.

WHAT YOU WILL MASTER IN THIS LESSON
  • Represent point-in-time meetings, infinite RFC 5545 recurrence rules (RRULE), single-date overrides, and 'this and following' series splits without materializing endless rows or drifting across DST.
  • Shard relational storage by calendar_id so week-view reads hit a single shard and meeting-room bookings execute as serializable transactions, while decoupling multi-guest invitations onto an async fan-out queue.
  • Compute privacy-preserving Free/Busy schedules in O(N log N) via parallel interval merging and absorb 167,000/s top-of-the-hour reminder bursts using minute-bucketed partitions and version checks.
  • Keep mobile and web clients synchronized across offline gaps using per-calendar monotonic change logs (sync_token) paired with lightweight push nudges.
SYSTEMATIC INTERVIEW CHECKLIST · RESHADED + 45-MIN CLOCK

8-Step RESHADED Execution Checklist

Follow this exact sequence from the Intro narration on every system design prompt so you never miss requirements, math, contracts, or the 13-minute deep dive.

0 / 8 Checked
INTERVIEWER SCORECARD · WHAT MAKES A STRONG HIRE?

5 Signals Bar Raisers Grade (L4 vs. L5 Senior vs. L6 Staff)

Senior (L5 / E5 / Senior SDE) Bar — Autonomous Pacing, Depth & Proactive Trade-Offs: Owns the 45-minute clock without prompting, derives every component quantitatively, surfaces failure modes (hot shards, stampedes, dual writes) BEFORE being asked, and defends consistency vs. latency trade-offs.
1. Scoping
✓ STRONG HIRE SIGNAL

Clarifies users, read/write skew, p99 latency, consistency bounds, and explicit non-goals in minutes 2–8.

✗ NO-HIRE RED FLAG

Jumps straight into drawing load balancers and microservices at minute 2 without asking a single question.

2. Right-Sized Design
✓ STRONG HIRE SIGNAL

Starts with the simplest working architecture justified by the math (e.g., 1 NVMe SQL primary + replicas + Redis for 40 writes/s & 3 TB).

✗ NO-HIRE RED FLAG

Recites a memorized Kafka + multi-DC Cassandra diagram that contradicts their own traffic calculations.

3. Technical Depth
✓ STRONG HIRE SIGNAL

Drives deep into 1–2 hard bottlenecks (partition keys, hot-key mitigation, transactional outbox, KV-cache batching) at minute 27.

✗ NO-HIRE RED FLAG

Skims across 12 boxes at identical buzzword depth and runs out of time before the deep dive.

4. Explicit Trade-Offs
✓ STRONG HIRE SIGNAL

Uses 3-part reasoning: 'A queue here because SMTP spikes to 3 s; checkout stays <60 ms, and we accept eventual email delay + retry dedup.'

✗ NO-HIRE RED FLAG

Name-drops tools ('We put Kafka and ZooKeeper here') without stating the alternative or operational cost.

5. Communication
✓ STRONG HIRE SIGNAL

Thinks aloud every 30–45s, checks alignment at phase transitions, and treats 'What if X fails?' as a cue for where points are awarded.

✗ NO-HIRE RED FLAG

Goes silent for 5 minutes while drawing or defends a flawed assumption defensively when nudged.

ARCHITECTURE & DATA-FLOW SLIDES · SLIDE 1 OF 1Section 01: System Design: Google Calendar
ARCHITECTURE / DATA FLOW DIAGRAM
Bob: yesAliceNew Yorkfree at 12:00?Calendar servicereminder 14:50BobLondonreminder 9:50Carol's phoneCarol's laptop
SECTION 01 OF 2

1. System Design: Google Calendar

★ FREE PREVIEW
Key Takeaway: A 10:1 read-to-write ratio (35,000 RPS peak reads vs. 1,200 RPS writes) rewards pre-expanded week-view caching and calendar_id sharding, while unbounded recurring rules and 167,000/s top-of-the-hour reminder spikes shape the data and scheduling engines.
ARCHITECTURE / DATA FLOW DIAGRAM
Bob: yesAliceNew Yorkfree at 12:00?Calendar servicereminder 14:50BobLondonreminder 9:50Carol's phoneCarol's laptop

Four Distributed Systems Problems Hiding Inside a Calendar

Consider Alice in New York (America/New_York) scheduling an unending weekly Tuesday 10:00 meeting with Bob in London (Europe/London) and Carol across both a phone and a laptop. First, Bob must see the meeting at 15:00 London time—even across US and UK Daylight Saving Time transitions that occur on different weeks of the year—so wall-clock strings alone are ambiguous. Second, an infinite recurring meeting cannot be stored as infinite database rows, yet single Tuesdays must still support moving or cancellation. Third, RSVPs (YES, NO, MAYBE) and edits must propagate across every guest's calendar shard and every connected device without blocking the organizer's save call. Fourth, because meetings cluster on :00 and :30 boundaries, pre-meeting reminders (10 minutes prior) concentrate millions of notifications into identical 60-second windows.

  • Time Representation Dualism: Single moments require exact UTC timestamps, whereas recurring schedules require local wall time plus an IANA timezone identifier to survive DST.
  • Unbounded Recurrence: Queries must always specify a bounded [from, to] window because an RRULE without UNTIL or COUNT generates an infinite sequence.
  • Asymmetric Fan-Out: Most meetings invite 2-5 colleagues, but an enterprise town hall invites 5,000+ employees across hundreds of database shards.
  • Privacy-Preserving Availability: Finding a common meeting slot (Free/Busy) must expose occupied [start, end) blocks without leaking private event titles or attendee lists.

Functional and Non-Functional Requirements

Users structure their entire workday around their calendar, demanding sub-200 ms week-view rendering, 99.99% availability, and strict booking correctness for shared resources like conference rooms. While guest invitation copies can tolerate 1-2 seconds of asynchronous propagation delay, two organizers attempting to reserve Conference Room 4B for 12:00-13:00 simultaneously must never both succeed, and a 10-minute reminder delivered after the meeting starts is worse than useless.

CategoryRequirementTarget & Consistency Expectation
FunctionalEvent CRUD & Time ZonesCreate, update, and delete events with title, [start, end), and IANA time zone.
FunctionalInvitations & RSVPsInvite users and rooms; record YES, NO, or MAYBE responses visible to attendees.
FunctionalRecurring Events (RRULE)Support daily, weekday, N-th weekday, and monthly rules with this, following, or all edits.
FunctionalFree/Busy LookupReturn merged busy intervals across candidate attendees/rooms without exposing event details.
FunctionalScheduled RemindersDeliver push or email notifications at user-configured offsets (e.g., 10 min prior).
Non-FunctionalLow Read LatencyRender week/month calendar views in < 200 ms (p99).
Non-FunctionalConsistency & Room ExclusivityStrong single-calendar consistency (zero double-booked rooms); < 2 s eventual guest fan-out.
Non-FunctionalPunctual Burst DeliveryFire 167,000 reminders/s at :50/:20 minute marks within seconds of target minute.

Capacity Estimation and Core API Specification

With 100,000,000 (100M) DAU opening their calendar 10 times daily, read volume reaches 1,000,000,000 (1B) views/day—averaging 1,000,000,000 / 86,400 s ≈ 11,600 RPS and peaking 3x on weekday mornings at ~35,000 RPS. Assuming 1 event creation or edit per user daily (100M writes/day), write throughput averages 100,000,000 / 86,400 s ≈ 1,200 RPS, yielding a ~10:1 read-to-write ratio ideal for read-through caching. At 1 KB per event record (metadata, RRULE, guest list), storage grows by 100 GB/day or 36.5 TB/year, requiring horizontal sharding. Reminders total 100M events * 3 guests = 300M/day (~3,472/s average), but when 10M reminders target :00 meetings at :50 (e.g., 09:50), burst throughput jumps 48x to 10,000,000 / 60 s ≈ 167,000 reminders/s.

MetricCalculationResultArchitectural Driver
Calendar Read Rate1B/day / 86,400 s (* 3 peak)11.6K RPS avg / 35K RPS peakCache pre-expanded upcoming weeks in Redis.
Event Write Rate100M/day / 86,400 s~1,200 RPS (10:1 R:W)Sharded SQL easily handles ACID transactional writes.
Annual Event Storage100M/day * 1 KB * 365100 GB/day (36.5 TB/yr)Exceeds single-node disk; shard horizontally by calendar_id.
Reminder Minute Spike10M due in 1 min / 60 s~167,000 reminders/sPre-bucket reminders by fire_minute and buffer via queue.
POST  /events                             { "title": "Sync", "start": "2026-12-01T10:00:00", "end": "2026-12-01T11:00:00", "tz": "America/New_York", "rrule": "FREQ=WEEKLY;BYDAY=TU", "guests": ["bob", "carol"] }
GET   /events?from=2026-12-01&to=2026-12-31
PATCH /events/{id}?scope=this|following|all
POST  /events/{id}/reply                  { "response": "YES" | "NO" | "MAYBE" }
POST  /freebusy                           { "users": ["alice", "bob", "room_4b"], "from": "...", "to": "..." }
GET   /sync?token=8812                    -> { "changes": [...], "next_token": 8840 }
SECTION 02 OF 2

2. Design of Google Calendar

🔒 PRO SECTION
Key Takeaway: Shard relational tables by calendar_id, commit organizer writes synchronously while fanning out guest copies via a durable queue, expand local-timezone RRULEs with an exceptions overlay, and scan minute-bucketed reminders ahead of top-of-the-hour peaks.

Section 1 + Checkpoint Quiz #1 are unlocked free outside the paywall. Unlock all architecture slides, QPS & sharding trade-off tables, and all 80 narrated HD video lessons with Full Access — or inspect our sample payment system lesson first.

ACTIVE RECALL & TRADE-OFF PROBES

System Design Checkpoint Quizzes (1)

CHECKPOINT QUIZ #1

In "System Design: Google Calendar" (Functional and Non-Functional Requirements), how does a production-grade design handle "Functional" (Target & Consistency Expectation)?