04QuestionsGoogle Calendar

04 · Worked prompt

Google Calendar

Design recurring events, invitations, time zones, conflict handling, reminders, and concurrent updates.
35 minInterview blueprint
INTERVIEW RUBRIC

What a passing answer must show

100 points · 45 minutes

  1. 20pts

    Scope the problem

    0–5 min

    Prioritize the core flows, state the scale, and name the non-goals.

  2. 15pts

    Define contracts

    5–10 min

    Identify durable entities, APIs, idempotency, and the source of truth.

  3. 30pts

    Complete the diagram

    10–25 min

    Trace one write path and one read path. Label the commit boundary and async work.

  4. 20pts

    Lead one deep dive

    25–38 min

    Choose the highest-risk trade-off and explain the mechanism, alternative, and cost.

  5. 15pts

    Prove reliability

    38–45 min

    Walk a failure, recovery, metric, bottleneck, and evolution path.

DRAW THIS FIRST

One complete box-and-arrow design

Design recurring events, invitations, time zones, conflict handling, reminders, and concurrent updates.

Google Calendar · system architecture
Google Calendar system architecture. Series rules and exceptions are truth; occurrences and reminders are derived, versioned work. Request path: Calendar clients to Calendar API to Event service to Calendar DB. Asynchronous path: Calendar change log to Occurrence/reminder workers. Read path: Range query service to Occurrence index. External dependency: Notification providers.

Write

Calendar clients enters through Calendar API. Event service owns validation and commits the durable record to Calendar DB.

Propagate

Calendar change log separates the committed write from background work. Occurrence/reminder workers can retry safely while it builds Occurrence index.

Read

Range query service serves from Occurrence index, then checks authoritative state whenever freshness, policy, or correctness requires it. It also consults Notification providers as an explicit dependency.

Say this first: Series rules and exceptions are truth; occurrences and reminders are derived, versioned work.

Open the full whiteboard ↗
DEFEND THE DIAGRAM

Explain every boundary before adding more boxes.

Series rules and exceptions are truth; occurrences and reminders are derived, versioned work.

INTERVIEW CONTRACT

Design recurring events, invitations, time zones, conflict handling, reminders, and concurrent updates.

CAPACITY QUESTIONS TO QUANTIFY

Global time zones · long-lived series · read-heavy views · reliable reminders. State average and peak load, stored bytes, bandwidth or open connections, and the growth horizon before choosing a partitioning strategy.

01

End-to-end walkthrough

Trace the architecture in this order.

  1. 01
    Enter and classify the request
    Calendar clients → Calendar API

    Create, invite, range read enters over HTTPS / RPC. Calendar API handles identity, admission, routing, and request context; it deliberately does not own domain truth.

  2. 02
    Validate, then cross the commit boundary
    Calendar API → Event service → Calendar DB

    Event service receives the command, checks invariants and retry identity, then uses transaction to update Calendar DB. The user-visible mutation is accepted only after this boundary succeeds.

  3. 03
    Move replayable work off the request path
    Event service → Calendar change log → Occurrence/reminder workers → Occurrence index

    Event service emits publish after commit; Occurrence/reminder workers uses consume and project / update to build Occurrence index. Consumers must tolerate duplicate delivery and stale retries because this path is asynchronous.

  4. 04
    Serve reads from the right authority
    Calendar API → Range query service → Occurrence index / Calendar DB

    Range query service uses time-range scan for the common, read-optimized path and strong read when correctness or repair requires authoritative state. The API must state the freshness promise instead of hiding it.

  5. 05
    Contain the dependency boundary
    Occurrence/reminder workers → Notification providers

    send reminder crosses into Notification providers. Treat timeouts as ambiguous, use a deadline and idempotent retry or reconciliation, and keep the core state recoverable when the dependency is unavailable.

02

Ownership ledger

Why each box exists—and what it must defend.

ComponentOwnsWhy it existsInterviewer probe
Calendar APIAuth + account routingIdentity, admission, routingProtects the system edge and attaches trusted context before domain work begins.Timeout budgets, quotas, regional routing
Event serviceTimezone + recurrence writesWrite invariants and retry identitySerializes or conditionally applies state changes before acknowledging success.Concurrent writes, deduplication, hot ownership
Calendar DBSeries, exceptions, invitesAuthoritative durable stateProvides the one record used to resolve disputes, recover, and rebuild projections.Partition key, replication, consistency
Calendar change logVersioned mutationsDurable asynchronous handoffAbsorbs bursts and lets slow or optional work retry independently of the request.Ordering key, lag, retention, dead letters
Occurrence/reminder workersMaterialize + scheduleReplayable processingRuns expensive, fan-out, or side-effecting work with leases and bounded retries.Idempotency, poison work, autoscaling
Occurrence indexNear-term range readsRebuildable query stateShapes data for the dominant reads without weakening the write-side invariant.Freshness, versioning, rebuild time
Range query serviceExpand + merge occurrencesRead composition and freshness policyChooses authoritative or derived state and returns a stable client contract.Fan-out, cache policy, partial results
Notification providersEmail, push, SMSExternal capability, not local truthKeeps a specialized or third-party concern behind a replaceable contract.Ambiguous timeout, circuit breaking, fallback
03

Physical design

Name the database, shard key, indexes, and guarantees.

Database + storage
PostgreSQL/distributed SQL stores series, exceptions, invites, and reminders; a derived time index stores near-term occurrences.
Partitioning / sharding
Colocate by calendar_id/owner_account_id; partition occurrence projections by calendar and bounded time bucket.
Indexes
Range (calendar_id, start_time, end_time), invitations (invitee_id, status, start_time), and unique (series_id, occurrence_key).
Replication + consistency
Series, exceptions, and RSVP transitions are strong. Occurrences/reminders are versioned projections with bounded freshness.
Cache, queue + recovery
An outbox drives occurrence/reminder workers. Cache near-term ranges by calendar version and rebuild derived state after schema changes.
Capacity math
Estimate events/user, range QPS, shared-event fan-out, recurrence horizon, reminder throughput, and hot enterprise calendars.
Alternative rejected
Materializing every recurrence forever explodes rewrites; materialize a rolling horizon and expand distant ranges on demand.
04

Deep-dive candidates

Pick one risk and explain the mechanism, alternative, and cost.

Recurrence identity

Use a stable local occurrence key, not only a UTC timestamp

DST can move UTC while the human-intended 9am remains
Series edits

Split a series at a recurrence boundary for this-and-future updates

Mutating one rule destroys history and attendee expectations
Reminder correctness

Derive jobs from occurrence versions and cancel stale versions idempotently

A reminder is a materialized effect, not source of truth
05

Failure pressure test

Show detection, containment, recovery, and evidence.

Timezone rules change

Re-expand future occurrences from stored zone and local intent

events affected by tzdb update
Reminder worker retries

Dedupe occurrence, attendee, channel, version

duplicate reminder count
Concurrent RSVP

Conditional update on invitation version

conflict rate
Before you finish, explicitly cover
  • Functional requirements and non-goals
  • Peak traffic, storage, bandwidth, and growth
  • Entities, APIs, idempotency, and pagination
  • Source of truth and consistency promise
  • Partition key, replicas, caches, and hot spots
  • Retries, backpressure, failover, and reconciliation
  • Latency, saturation, correctness, and recovery metrics
  • Security, migration, cost, and multi-region evolution
SAY THIS WHILE YOU DRAW

A four-part talk track

  1. Scope

    “I’ll prioritize create one-time and recurring events and invite attendees and track rsvp.”

  2. Scale

    “The design changes around global time zones · long-lived series · read-heavy views · reliable reminders.”

  3. Decision

    “Store recurrence rules plus exceptions instead of materializing an unbounded future.”

  4. Risk

    “The first failure I want to pressure-test is: DST changes and series edits can produce wrong times or lost responses.”

Reference details

Open these only after you can explain the diagram above without reading.

01Requirements and state lifecycle4 requirements
  • Create one-time and recurring events
  • Invite attendees and track RSVP
  • Render correctly across time zones and DST
  • Schedule reliable reminders and handle series edits
Google Calendar · state lifecycle
02Data model and APIs4 entities · 3 interfaces

Core entities

EventSeriesseries_id, organizer, timezone, recurrence_rule, versionOwner: Calendar service
OccurrenceExceptionseries_id, local_key, override, statusOwner: Calendar service
Invitationevent_id, attendee_id, response, versionOwner: Invitation service
Reminderoccurrence_id, attendee_id, fire_at, stateOwner: Scheduler

External interfaces

POST /v1/calendars/{id}/events

Create a series with local-time semantics

PATCH /v1/events/{id}?scope=this_and_future

Split or update a recurrence series

POST /v1/events/{id}/responses

Version-check an attendee RSVP

03Deep dives and trade-offsChoose one

Recurrence identity

Use a stable local occurrence key, not only a UTC timestamp

DST can move UTC while the human-intended 9am remains

Series edits

Split a series at a recurrence boundary for this-and-future updates

Mutating one rule destroys history and attendee expectations

Reminder correctness

Derive jobs from occurrence versions and cancel stale versions idempotently

A reminder is a materialized effect, not source of truth
04Failures, recovery, and evidence3 scenarios

Timezone rules change

Re-expand future occurrences from stored zone and local intent

events affected by tzdb update

Reminder worker retries

Dedupe occurrence, attendee, channel, version

duplicate reminder count

Concurrent RSVP

Conditional update on invitation version

conflict rate
05What makes the answer seniorInterviewer signals
  • The key question is what the user meant locally, not how to store UTC
  • Explain this event, this-and-future, and whole-series semantics
  • Keep the unbounded future as a rule rather than infinite rows
  • Primary trade-off: Store recurrence rules plus exceptions instead of materializing an unbounded future.
BEFORE THE NEXT QUESTION

Can you redraw it from memory?

  • Name the source of truth.
  • Trace the write and read paths.
  • Defend one trade-off.
  • Recover from one failure.