Start with the rule that must never be broken

For an ordinary fixed-capacity class, confirmed participants must not exceed the effective capacity. Define what effective means: the room may fit twelve people, but today's equipment or instructor arrangement may permit ten. A website displaying two free places is a recent observation, not a promise that two places will still exist when another person presses Book.

Include staff-created bookings in the same rule. Otherwise a client app can pass its own tests while a receptionist unknowingly fills the last place through another screen. Describe a countable unit too: one booking for a parent and child may represent two participants. The purpose is an unambiguous operating rule that a developer and a studio manager can test together, not a particular database brand.

Walk through two requests for the final place

Consider a fictional ten-place class with nine confirmed participants. Ana and Boris both see one place available. Their phones submit within the same second. If each request independently reads nine, decides there is space and then saves a booking, the result can be eleven participants. Faster screen refreshes do not remove this race; the decision and the capacity update must be coordinated at the authoritative system.

The acceptance result should be one additional confirmed participant and one clear non-confirmation. The unsuccessful client may join a waitlist or choose another class; they should not be charged a class credit for a place they did not receive. Which request wins depends on the implementation's successful ordering, not on who saw the free-place label first. Do not promise that email delivery order determines priority.

View the worked example diagram
Two requests for one place: attendance rises from nine to ten and one client is not confirmed; One remaining place.; Two requests.; 9 / 10 → 10 / 10; ANA: confirmed
One place
One booking record; BORIS: not confirmed
No booking credit used
Offer another choice; Example outcome; confirmation decides the final place; EXAMPLE / ПРИМЕР; One place, one record
Original explanatory model. The example values, decisions and limits are developed in the article.

Choose whether checkout creates a temporary hold

A temporary hold can protect a client's place while they finish checkout, but it reduces availability before a final booking exists. Define its expiry, how it is released and what happens if payment arrives just after expiry. Show held, confirmed and available counts separately to staff; otherwise empty-looking classes can appear inexplicably full.

In an example with one remaining place, a hold from 14:00 to 14:05 prevents another client taking that place during the hold. At 14:05 the system must establish the actual current state before releasing or confirming it. A late payment notification must not create a second place if the hold has expired and someone else is confirmed. The exact reconciliation or refund policy needs the business and payment provider's rules; a generic timer is not a complete design.

Keep retries different from new requests

After an interrupted response, the client may not know whether the booking succeeded. Repeating the same logical request should retrieve the first outcome, rather than create a new participant. In software design this is commonly addressed with an idempotency mechanism: a stable identifier for that one attempted operation. It is not the same as blocking all later bookings by that client.

A separate problem is a transaction that fails because another operation changed the state. PostgreSQL's documentation explains that some isolation levels require retrying the whole transaction after a serialization failure. That is a developer-level example, not evidence of Movezy's storage implementation. The studio acceptance requirement stays simple: after a conflict or retry, the participant count and credit record agree and the client sees a definite result.

Test staff changes as well as client clicks

Use an isolated class with owned test accounts. Start at nine of ten places and submit the final two requests together. Repeat with a staff booking competing against a client, an expired hold, a cancelled participant releasing one place and a repeated request after the first response is lost. For each case reconcile confirmed participants, active holds, available capacity and consumed credits.

Also reduce capacity below current attendance. The system should flag an over-capacity situation for resolution, not silently delete a client's booking or display negative free places as if that were normal. Record who changed the limit and why. Stop the rollout if staff cannot explain a mismatch from the booking history. A calm, explicit manual review is better than an automatic correction whose customer consequences are unknown.

Your working sheet

Use these fields to adapt the example to your situation. The blank text download requires no signup.

  • Effective class limit
  • Confirmed participants
  • Active holds and expiry
  • Concurrent request outcomes
  • Credits consumed
  • Staff reconciliation
Download the blank worksheet

Frequently asked questions

Does showing live availability prevent double bookings?

No. Display freshness helps users, but the authoritative booking operation must coordinate the capacity check and update.

Should every unpaid request hold a place?

That is a business design choice. If holds are used, their expiry, release and late-payment treatment must be explicit and tested.

Can reducing capacity remove confirmed clients automatically?

Do not assume that outcome. Flag the conflict and follow an explicit staff resolution policy rather than silently cancelling reservations.

Sources and preparation

Prepared with AI assistance; sources checked 19 October 2026. Examples are hypothetical. No personal review by Martin is claimed. Send corrections through our contact page. Contact.

What a class booking confirmation should contain

Try the booking demo