Prevent double bookings: why systems fail, and the model that can't

Double-booking almost never happens because a calendar "made a mistake". It happens because the software checked whether a slot was free, and reserved it, as two separate steps with a gap in between — and a second customer slipped through the gap. Close that gap and the rest of the calendar can be as simple or as elaborate as you like. Leave it open, and no amount of polish on the booking widget stops two people occasionally landing on the same chair.

Where the gap actually opens

The ordinary sequence behind almost any booking: check "is this slot still free?", get back "yes", then write the booking. A read, then a write — and between them, however briefly, a window. A second request that checks the same slot during the window also sees "yes, still free". Both now believe they're booking an open slot, because at the moment each one looked, it was.

You cannot tell, by clicking through a demo on a quiet Tuesday afternoon, whether the check and the write underneath are safely joined or dangerously apart — the calendar looks identical either way.

Why "just add a nicer calendar" doesn't fix it

A lot of booking software is, underneath the widget, a generic form builder that was never designed for two people claiming the same finite thing at once. The date picking can be smooth, the availability live-looking, the confirmation screen clean — and the back end still checks with one read and writes with a separate, later write. Real, simultaneous traffic finds the seam.

The model that actually closes the gap

Stop treating "check" and "reserve" as two operations: re-run the availability check and write the booking inside a single database transaction that locks the rows for that slot. Whichever request arrives first finishes its check-and-write uninterrupted; the second waits its turn, then re-checks against the new reality. No window remains in which stale "still available" information can be acted on — the database enforces the order, rather than application code hoping nothing races.
Bookings and scheduling in the Olmira admin

What actually happens when two people click "book" at once

1

Both requests arrive close together

2

One request takes the lock first

3

The first request re-checks and writes, together

4

The second request re-checks against the new reality

5

The second customer is told immediately

How Olmira handles this

Olmira's booking engine runs the availability re-check and the booking write as one step, inside a single locked database transaction — so when two customers go for the same slot at once, one booking commits and the other is told, before any money moves, that the time just went. The same lock covers the underlying resource, not just the service being sold, so two different services sharing a room or a staff member can't quietly double-book it between them either. A separate, smaller guard catches the more common accident — the same customer double-clicking "book" — and asks them to confirm rather than silently creating two appointments. See how it fits together on the bookings page.

Related guides

Staff, rooms, equipment

No-shows: what actually moves the number

A calendar that tells the truth about what's free

Real slots, checked and locked at the moment they're booked — not a guess based on what the page loaded a second ago.