Booking Engine API
REST API backend for a B2B travel booking platform handling real-time availability, reservations, and multi-provider integrations.
Overview
A high-throughput REST API serving as the core backend for a B2B travel booking platform. The system aggregates availability and pricing from multiple tour operator APIs and exposes a unified interface for web and mobile clients.
Architecture
The system follows a layered architecture with a clear separation between the API layer, application services, and provider integrations. Background job processing via SQS handles availability cache warming and webhook delivery.
Client Request
↓
API Layer (Laravel)
↓
Application Services
↓ ↓
Cache (Redis) Provider Integrations
↓
Database (MySQL)
Key technical challenges
Provider heterogeneity. Each tour operator had a different API protocol, authentication mechanism, and data format. Built an adapter layer that normalizes provider responses into a uniform internal schema, isolating provider complexity from the application core.
Real-time availability. Availability data changes frequently and provider APIs have strict rate limits. Implemented a cache-aside strategy with Redis: warm caches on low-traffic windows via background jobs, with a lazy-refresh fallback on cache misses.
Reservation consistency. Double-booking prevention required distributed locking using Redis before committing reservation state to the database. Saga-like compensation logic handles partial failures in multi-step booking flows.
Infrastructure
- Deployed on AWS EC2 behind an Application Load Balancer
- RDS MySQL with read replicas for reporting queries
- Redis Elasticache for caching and distributed locking
- SQS + Lambda for async job processing
- Docker Compose for local development parity