Design Google Calendar

Hard45 min
1 / 30
understanding6 min read

Problem Statement & Calendar Context

Google Calendar — Problem Statement & Calendar Context

Problem Statement & Calendar Context

Google Calendar coordinates billions of timed commitments across personal, team, and resource calendars. The interview probes recurrence engines, timezone normalization, free-busy intersection, and optimistic concurrency on shared events.

Design anchors

Interviewers expect you to connect event instance, VTIMEZONE, organizer mailbox, workspace tenant to measurable behavior—not generic CRUD. For Google Calendar scale, cite ~500M DAU, agenda reads dominating writes, and recurrence expansion as the hidden CPU cost.

Deep dive

When two executives drag-resize the same meeting, sequence numbers detect staleness and return HTTP 409 so clients refetch. Resource calendars (conference rooms) use stricter overlap checks than personal busy blocks. External ICS subscribers poll feeds; internal users get push within seconds via notification workers fed by an outbox table.

Operational note

Monitor expander backlog depth and freebusy_query_latency p99. If reminder_delivery_lag exceeds 60s, page on-call—users forgive slow month view more than missed board meeting alerts.

pythonOne Dark Pro
1def overlaps(a_start, a_end, b_start, b_end) -> bool:
2 return a_start < b_end and b_start < a_end

Key Highlights

  • Separate the event template from its expanded instances — recurrence is the hidden CPU cost
  • Normalize times to UTC but store the original VTIMEZONE; DST math happens at expansion, not at storage
  • Free-busy is interval intersection; resource (room) calendars use stricter overlap than personal busy blocks
  • Optimistic concurrency via sequence numbers: a stale drag-resize gets 409 and the client refetches
Signal
Mention event instance with a number when discussing Problem Statement & Calendar Context.
Delivery
Draw timeline for VTIMEZONE before diving into storage.

Section Rescue Kit

Buzzwords to use:

RRULE-1VTIMEZONE-1

Safe statements:

  • "If unsure on Problem Statement & Calendar Context, I restate invariants: sequence monotonicity and opaque free-busy."
  • "I can pivot to organizer mailbox trade-offs while staying on calendar scope."
Design Google Calendar - System Design | WinJob | WinJob