# Calendar scheduling - a time that suits five people

> Why a meeting time is computed from rules and guesses rather than read from a table, and what that costs. Every free/busy answer here is a cached, rounded…

Source: https://tierslate.com/templates/calendar-scheduling

Collaboration · System design · core · 9 step walkthrough · 5 tables

Why a meeting time is computed from rules and guesses rather than read from a table, and what that costs.

**Own this board: 400 credits.** The first act plays on the page. Owned once with credits, never a subscription.

## What this board gets wrong on purpose

The tension: Every free/busy answer here is a cached, rounded, deliberately vague reply from a system this one does not control - opaque blocks with no titles, half-hour granularity, a short horizon, a fifteen-minute TTL and a sizeable share of lookups that simply fail. The board then presents the intersection as though it were a fact, and there is no reservation anywhere: two organisers scheduling at the same moment will both be offered the same slot and both will take it, with the collision surfacing later as an RSVP. Treating an unknown as free is what makes that happen and treating it as busy makes the product useless, so the board treats it as free and says so here. Underneath, tzdata is versioned state baked into every binary: when a government moves a DST boundary, every materialised UTC instant is wrong until a re-expansion job has run, and any service still holding the old rules disagrees with the ones that have upgraded - which shows up as reminders an hour early for a fraction of users and as nothing at all in any error rate.

## Practise this as an interview

Take Calendar scheduling - a time that suits five people as a timed system design interview on a blank board - on your own, with the requirements to check yourself against, or with a candidate you invite.

## Start here

### Why this design

Scheduling looks like a set-intersection exercise and is really a lesson in data that is not a fact: recurring events are rules rather than rows, local times are not instants, and another company’s free/busy is a deliberately vague cached guess. Interviewers use it to see whether you model time correctly before you scale anything; calendar teams live with the consequences, because every bug here is a meeting at the wrong hour rather than an error in a log.

### What you will learn

- Why a recurring series is stored as ONE row holding an RRULE, how occurrences are expanded per window, and how exceptions are keyed by recurrence id.
- When the local wall-clock time plus an IANA zone is the truth and when the UTC instant is, and what to do with the 02:30 that does not exist on DST morning.
- How a "find a time" request fans out into per-attendee expansion, a five-minute busy bitmap and a working-hours mask - and where its 1.2 s budget goes.
- Why cross-organisation free/busy is opaque, rounded and cached, and why rendering "unknown" as free is the bug users actually report.
- Why the system proposes a slot but reserves nothing, and how reminders fire exactly once through an idempotency key.
- Treating tzdata as a versioned release artefact with its own rollout and re-expansion job.

### How to read this board

1. Diagram, left to right: PEOPLE, then THE ASK (the request), then RECURRENCE (one row, meetings computed), then THE ANSWER (merge into a proposal).
2. Then the right-hand column: TIME ZONES, a property of every value, and ANOTHER ORGANISATION, the system this one cannot interrogate. Press play for the walkthrough.
3. Page 1 · Requirements - the questions to ask before drawing, and the latency and correctness targets.
4. Pages 2 and 3 · Capacity and Storage - the numbers that make expansion, not storage, the hot path.
5. Page 4 · Availability - what degrades rather than dies, and the failures with no error.
6. Page 5 · How it works - the whole request told end to end, then Page 6 · Deployment, including the tzdata rollout.
7. Finally the DATA MODEL at the bottom: five tables, and the one with no foreign key that most answers come from.

## 1 · Requirements

### Ask these before drawing anything

- Is a recurring event one thing or many? One row with a rule is the only affordable answer, and it means every read does work and every exception is a patch.
- Does "09:00 every weekday" mean the same wall clock or the same instant? Wall clock, always, for a recurring meeting - which means its UTC time moves twice a year and the stored instant is a cache, not the truth.
- What happens to a recurring meeting at 02:30 on the morning the clocks go forward, when 02:30 does not exist? Pick a rule, write it down, and apply it in exactly one place.
- Can an external organisation see whether we are busy, and at what granularity? The answer is a policy decision with an architecture attached - opaque blocks, coarse rounding, and a short horizon are all deliberate.
- Is a proposed time held while the organiser decides? Almost no calendar system does this, so two organisers can and will take the same slot. Decide whether you are fixing that or accepting it.
- What does an unanswerable free/busy lookup mean - free or busy? Free books over people. Busy makes the product useless. There is no correct answer, only a chosen one that has to be visible.
- How far ahead may anyone schedule? It bounds recurrence expansion, which is the hottest operation in the system.
- Do we have to interoperate over iCalendar and iTIP? If yes, a large share of the semantics is decided by a specification from 1998 rather than by this design.

### Functional

- Create a one-off or recurring event, with attendees, in a named time zone.
- Edit or cancel a single occurrence of a series, or this-and-all-following, without disturbing the rest.
- Find candidate times for N people over a window, respecting each person’s working hours in their own zone.
- Read free/busy for people in other organisations, at whatever granularity they will give.
- Track per-attendee responses, and show the organiser who has not replied.
- Fire reminders at the right local time, exactly once, per attendee preference.

### Non-functional

- Render a month of a calendar with 180 recurring series: p95 under 400 ms.
- Suggest times for 5 attendees over 14 days: p95 under 1.2 s, including external lookups, with a hard 800 ms budget on each external call and an explicit "unknown" when it is exceeded.
- A reminder fires once. Not twice, which is worse than not at all, and not an hour out.
- Instance identity is stable: an occurrence keeps its identity across edits to the series, because attendee responses and reminders are attached to it.
- 99.95% for reading a calendar. Free/busy for external domains has no availability target at all, because it is not this system.

### Out of scope

- Room and resource booking, which needs actual reservation semantics and is therefore a different board.
- Video conferencing links, which are an attachment.
- Travel-time and location awareness.

## The rest of this board

This page publishes the question. The answer - 5 more written pages, a 9-step narrated walkthrough and a 5-table schema - is the board itself, and it opens in Tierslate.

- 5 written pages
- 9 walkthrough steps
- 5 tables (42 columns)

5 pages behind this one:

- Capacity estimation
- Storage estimation
- Availability
- How it works
- Deployment plan

## Related system design templates

- [Code review system design](https://tierslate.com/templates/code-review) - What it takes to keep a conversation attached to code that is rewritten underneath it while the conversation is still going.
- [Collaborative editor system design](https://tierslate.com/templates/collaborative-editor) - How two people type into one document at the same time without either of them losing a character.
- [Version control system design](https://tierslate.com/templates/version-control) - Why history is a graph rather than a list, and what that costs at merge, at fetch and at garbage collection.
- [Whiteboard sync system design](https://tierslate.com/templates/whiteboard-sync) - Why a shared canvas is mostly a broadcast problem, and what happens to a shape that two people grab at once.
- [Kanban board system design](https://tierslate.com/templates/kanban-board) - How cards are reordered with fractional ranks instead of renumbering, and how live updates reach every viewer.
- [File sync system design](https://tierslate.com/templates/file-sync) - How files sync across devices by chunk and version, and what a conflict looks like when two laptops were offline.
- [Multiplayer game server system design](https://tierslate.com/templates/multiplayer-game) - Why an authoritative server with client prediction hides latency, and how a tick rate sets cost and fairness.

All 100 system design templates: https://tierslate.com/templates (Markdown: https://tierslate.com/templates.md)
