Booking conflicts happen mainly when two or more users try to reserve the same resource for overlapping times. This causes the system to have to decide which booking to accept.
A centralized locking mechanism ensures that when one user is booking a resource, others cannot book it simultaneously, preventing conflicts.
Partitioning resources by time slots and using distributed locks per partition allows multiple bookings to proceed in parallel without conflicts, improving scalability.
Optimistic concurrency control allows conflicts to happen but detects them before finalizing. This means users might have to retry their booking if a conflict is found.
One second has 1000 milliseconds. Each booking takes 50 milliseconds, so 1000 / 50 = 20 bookings per second.