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.
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.
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 }