Here’s the same style, but for a multi-provider booking marketplace like Booksy / Fresha / Treatwell.


System Design Interview Task

Problem

Design a booking platform where many users can discover and book appointments with many service providers such as:

The platform must support provider schedules, time-slot availability, booking creation, and conflict prevention.


Functional Requirements

  1. Users can:
  1. Providers can:
  1. System must support:

Non-Functional Requirements


Expected Architecture (Hint)

Candidates should arrive at something like this.

Main Flow

Users / Providers
       │
       ▼
 API Gateway
       │
 ┌─────┼───────────────┐
 ▼     ▼               ▼
Search Service   Availability Service   Booking Service
       │              │                  │
       ▼              ▼                  ▼
Search DB       Cache + Slots DB      Transactional DB
                                          │
                                          ▼
                                   Queue / Event Bus
                                          │
                    ┌─────────────────────┼─────────────────────┐
                    ▼                     ▼                     ▼
             Notification Service   Calendar Sync       Analytics/Audit

Core Data Model

Provider

Slot / Availability

Booking


Key System Design Challenges

1️⃣ Search vs Booking split

Search traffic is much higher than booking traffic.

So split into:

Search can be eventually consistent.
Booking must be strongly consistent.


2️⃣ Availability modeling

Two common ways:

A. Precomputed slots

Generate 15-min / 30-min slots ahead of time.

Pros:

Cons:

B. Dynamic computation from calendar + bookings

Compute free intervals on read.

Pros:

Cons:

In interview, strong answer:


3️⃣ Preventing double booking

This is the most important part.

Two users may try to book the same provider/time at once.

Best approach

Use a transactional booking DB with an atomic constraint.

Examples:

Flow:

  1. User chooses slot

  2. Booking service starts transaction

  3. Verify slot still FREE

  4. Mark slot BOOKED

  5. Insert booking row

  6. Commit

Only one request succeeds.


4️⃣ Temporary hold before payment

Real systems often place a short hold.

Example:

This avoids users losing a slot during checkout.

Implementation:


5️⃣ Idempotency

Users may retry due to timeout or double-click.

Use:

Without this, duplicates can happen even if slot conflict is protected.


Suggested Storage Choices

Search DB

Elasticsearch / OpenSearch / Postgres read replica

Good for:

Booking DB

Postgres / MySQL

Good for:

Cache

Redis

Good for:


Booking Flow

[Diagram]

Read Path for Availability

[Diagram]

Key Discussion Points

1️⃣ Why separate availability from booking?

Because:


2️⃣ Why SQL for booking?

Because booking correctness needs:

This is usually stronger than trying to solve it only with NoSQL.


3️⃣ What if provider changes schedule?

Need recomputation:


4️⃣ What about cancellations?

On cancellation:


5️⃣ What about overbooking from multiple app servers?

Solved by DB-level transactional guarantee, not by app memory.

Never rely on:

Because system is distributed.


Scaling Strategy

Search side

Booking side


Important Tradeoffs

Strong consistency only where needed

Precompute vs compute-on-read

Hold vs no hold


Follow-Up Questions Interviewers May Ask

Reliability

What happens if notification sending fails after booking is confirmed?

Good answer:

Concurrency

How do you prevent two users booking the same slot?

Good answer:

Scale

What if you have millions of providers?

Good answer:

Payments

Where should payment happen?

Good answer:

Auditing

How do you track provider/user actions?

Good answer:


What Interviewer Wants to Hear

Strong candidate signals:

Weak signal:


Short Interview Prompt Version

Design a booking marketplace similar to Booksy where many users can browse providers, view available time slots, and book services like cleaning or repair. The system should support provider schedules, cancellations, rescheduling, and notifications, while preventing double booking under high concurrency.


10-minute whiteboard answer structure

  1. Clarify entities: users, providers, services, slots, bookings

  2. Separate read path from booking path

  3. Design provider schedule + slot model

  4. Solve double booking with SQL transaction

  5. Add hold flow, idempotency, notifications

  6. Discuss scaling and failure cases

If you want, I can turn this into a full interview-ready answer with diagram + exact words to say aloud.