Bird
0
0

You are designing a booking system for meeting rooms. To handle conflict resolution at scale, which approach is best to ensure no overlapping bookings and high performance?

hard📝 Trade-off Q15 of 15
LLD - Design — Hotel Booking System
You are designing a booking system for meeting rooms. To handle conflict resolution at scale, which approach is best to ensure no overlapping bookings and high performance?
AUse a centralized lock on the entire booking database for each new booking
BCheck for conflicts by querying only relevant time slots and use optimistic concurrency control
CAllow all bookings and resolve conflicts manually later
DStore bookings without timestamps and rely on user honesty
Step-by-Step Solution
Solution:
  1. Step 1: Understand scalability and conflict resolution needs

    Centralized locking (Use a centralized lock on the entire booking database for each new booking) causes bottlenecks; manual or no checks (Options C, D) cause errors.
  2. Step 2: Choose efficient conflict detection method

    Querying only relevant time slots reduces load; optimistic concurrency control handles race conditions efficiently.
  3. Final Answer:

    Check for conflicts by querying only relevant time slots and use optimistic concurrency control -> Option B
  4. Quick Check:

    Efficient conflict check + concurrency control = scalable solution [OK]
Quick Trick: Query relevant slots + optimistic control for scalable conflict resolution [OK]
Common Mistakes:
  • Using global locks causing slowdowns
  • Ignoring concurrency issues
  • Not filtering bookings by time before checking

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More LLD Quizzes