Design calendar event conflict handling
I was asked this
No reports yet. Sign in to say where you were asked it.
A system design interview question asked in Google's system design round, last asked Apr 2026. It tests calendar, concurrency and scheduling.
Design the event settings and conflict handling for a calendar product at the scale of a major consumer and business calendar. Users create, update and delete events with attendees, start and end times, a time zone, recurrence rules, reminders, visibility, a location or room, and a video link. The focus is how the system finds and handles conflicts when an event is created or changed: overlapping events for the same person or room, two bookings made at the same moment, and recurring events that clash with others.
Requirements
- Functional: event CRUD with attendees and rooms; recurrence with exceptions (this occurrence, this and following, whole series); a conflict check on create and update that returns the conflicting intervals; a configurable policy per calendar or resource (reject, warn and require confirmation, allow); free/busy views of other calendars within their sharing settings; suggested alternative times.
- Non-functional: around 10^8 active users; reads (free/busy, conflict checks) far outnumber writes; a conflict check in tens of milliseconds for the organiser plus a few attendees; no lost events; correct behaviour across time zones and daylight-saving changes; no double booking of rooms under concurrent writes.
Clarifying questions
- Is double booking blocked or only warned about? Does it differ for people and for rooms?
- For a multi-attendee event, do we check every attendee, only required ones, or only the organiser?
- How far ahead must recurring events be checked, and are infinite recurrences allowed?
- What may a user see of a calendar they do not own: details, busy only, or nothing?
- Do tentative, free and out-of-office events count as conflicts?
- Do we need to check calendars in other systems?
What a strong answer covers
- Two shapes of data: a canonical event store (events, attendees, recurrence rules, exceptions) and a derived availability index of busy intervals per calendar, built for overlap queries.
- The overlap rule stated exactly: half-open intervals, so back-to-back events do not conflict; only busy, tentative and out-of-office events count.
- The index: rows keyed by
(calendar_id, start)with a query forstart < new_end AND end > new_start, or interval trees or time buckets; the cost of a check forkattendees. - Recurrence: store the rule, materialise occurrences up to a rolling horizon, expand on demand beyond it, and report conflicts per occurrence.
- Time: store the wall-clock time plus the IANA time zone for recurring events, compute overlap in UTC, and recompute occurrences when zone rules change.
- Concurrency: optimistic versions on the event, and for strictly exclusive resources (rooms) a per-resource lock, a conditional write or a reservation with a short TTL; why a check-then-write without one of these double books.
- Keeping the index in sync with the event store: the same transaction, or an outbox and change stream with rebuild and drift detection.
- Privacy: conflicts on calendars the viewer cannot read come back as opaque busy blocks.
- The user experience: show the conflicting times and suggest free slots instead of a bare error.
Follow-ups
- Add "find a time that works for everyone". How does the cost grow with attendees and time zones?
- A recurring meeting conflicts on only some weeks after a daylight-saving change. Explain how your design causes or prevents that.
- Rooms must never be double booked and 50 people try to book the same room in one second. Which concurrency approach holds up?
- How do you detect and repair drift between the event store and the availability index?
Where it's asked
- Google · System design · Last asked Apr 202645 min · Whiteboard for the diagram, a doc for requirements and capacity math
What it tests
calendar · concurrency · scheduling
No official answer yet. Draw yours on the right; publish it and it shows under Community.
Nothing published yet. Publish your canvas and it shows here for others to open and remix.
