Productivity & collaboration · Intermediate
Google Calendar
Recurrence rules expanded on read, free/busy, sync tokens and a reminder scheduler.
Every part, and why it is there
Calendar apps
Mostly reading: a week view, a day view on a phone, a widget. Creating or moving an event is comparatively rare, but it must reach every attendee.
Other calendar clients
Apple Calendar, Outlook and others sync over CalDAV or the API. They poll for changes, so incremental sync matters a lot.
API gateway
Authenticates, applies per-app quotas and routes event and free/busy calls.
Event service
Owns events. GET /calendars/:id/events?syncToken= returns only what changed since the token, so clients do not re-download a whole calendar. Writes publish a change event for reminders and invitations.
Calendars & events
One row per event (not per occurrence) with its recurrence rule, attendee list and time zone, sharded by calendar. Exceptions like “this Tuesday’s standup moved” are stored as override rows.
Recurrence expander
Turns a rule like “every weekday at 9:00 Europe/London until June” into concrete occurrences for the window being viewed, applying overrides and DST changes.
Expanded instances cache
Caches expanded occurrences per calendar and week so the busy Monday-morning rush of week views does not re-expand every rule.
Free/busy service
POST /freeBusy answers “when are these 8 people busy next week?” without revealing event details. Scheduling assistants call it constantly, so it reads expanded instances, not raw events.
Event changes
Every create, update and cancel. Reminder scheduling and invitation emails consume it independently.
Reminder scheduler
Keeps one timer per upcoming reminder, re-armed whenever an event moves, and every few seconds fires the ones that are due.
Reminder timers
Reminders keyed by the minute they should fire, so “what is due now?” reads one small bucket instead of scanning every event.
Notification service
Sends reminders as pushes and invitations or updates as emails with an iCalendar attachment, so attendees on other calendar systems can accept too.
APNs / FCM
Delivers “Standup in 10 minutes” to phones.
Email provider
Sends invitations and updates to attendees, including people outside the organisation.
Asked in interviews at
- microsoft
- oracle
- amazon
Learn more
- System Design Interview: Design Calendar Application (Aced (formerly Exponent))
- Design Google Calendar - Backend Step-by-Step Walkthrough (ShowOffer - Tech Interview Coaching Platform)
- Synchronize resources efficiently (Google for Developers)
- Recurring events (Google for Developers)
- RFC 5545: iCalendar (IETF)