0
0
LLDsystem_design~12 mins

Booking conflict resolution in LLD - Architecture Diagram

Choose your learning style9 modes available
System Overview - Booking conflict resolution

This system manages booking requests for resources like rooms or appointments. It ensures no two bookings overlap for the same resource by detecting conflicts and resolving them before confirming the booking.

Architecture Diagram
User
  |
  v
Load Balancer
  |
  v
API Gateway
  |
  v
Booking Service <--> Conflict Resolver Service
  |                      |
  v                      v
Cache <---------------- Database
Components
User
client
Sends booking requests and receives confirmations or conflict notifications
Load Balancer
load_balancer
Distributes incoming user requests evenly to API Gateway instances
API Gateway
api_gateway
Routes booking requests to Booking Service and handles authentication
Booking Service
service
Processes booking requests and interacts with Conflict Resolver to check for overlaps
Conflict Resolver Service
service
Checks for booking conflicts using data from Cache and Database, and decides if booking can proceed
Cache
cache
Stores recent booking data for quick conflict checks to reduce database load
Database
database
Stores all booking records persistently
Request Flow - 13 Hops
UserLoad Balancer
Load BalancerAPI Gateway
API GatewayBooking Service
Booking ServiceConflict Resolver Service
Conflict Resolver ServiceCache
CacheConflict Resolver Service
Conflict Resolver ServiceDatabase
DatabaseConflict Resolver Service
Conflict Resolver ServiceBooking Service
Booking ServiceDatabase
Booking ServiceCache
Booking ServiceAPI Gateway
API GatewayUser
Failure Scenario
Component Fails:Cache
Impact:Conflict Resolver cannot quickly check recent bookings, causing more database queries and higher latency
Mitigation:System falls back to querying the database directly for conflict checks; cache is rebuilt asynchronously
Architecture Quiz - 3 Questions
Test your understanding
Which component is responsible for detecting booking conflicts?
ABooking Service
BConflict Resolver Service
CAPI Gateway
DLoad Balancer
Design Principle
This design separates conflict detection into a dedicated service to keep booking logic clean and scalable. Using cache reduces database load and speeds up conflict checks, improving user experience.