Design a Dog Walking and Sitting Booking Platform
Search sitter availability, quote time-based rates, hold a slot for ten minutes, book it safely, and display the completed route.
Problem statement
For this exercise, assume the following practice scope. Design a dog walking and sitting booking platform. For this exercise, booking intervals are half-open [start, end) values stored as UTC instants with a named display time zone.
Owners search a requested time interval and area for sitters whose recurring or exception availability overlaps or fully covers it, view an explicit available sub-interval and versioned rate quote, place a ten-minute hold, and confirm one booking.
Owners create, view, reschedule, and cancel upcoming bookings; sitters add or remove availability and rates and view their upcoming bookings. A hold temporarily excludes conflicting inventory, expires automatically, and confirmation is idempotent. Overlapping confirmed bookings are forbidden.
A completed walk may publish a privacy-filtered route to its owner; raw live route access is limited to the active booking. Design interval modeling, search, quotes, holds, confirmation, schedule changes, upcoming-booking reads, route capture and display, expiration, and reconciliation.
Payment execution, identity verification, messaging, and marketplace ranking are outside scope.
What to build
- Let sitters manage versioned availability intervals, exceptions, service area, and rates.
- Search by requested interval and show the exact available overlap or full-coverage interval.
- Create a ten-minute hold and confirm one non-overlapping booking idempotently.
- Create, view, reschedule, and cancel upcoming bookings idempotently without losing the original interval on a failed change.
- Capture and display an authorized, privacy-filtered walk route for the booking.
At scale
- Assume 1.5 million owners, 1 million sitters, and 20,000 searches per second at peak.
- Search should return within 500 ms p95; hold and confirmation within two seconds p99.
- Availability is planned up to 90 days ahead; holds expire after ten minutes; bookings are retained for seven years.
- Concurrent holds or confirmations for the same sitter interval must never create overlapping confirmed bookings.