A scalable event-driven booking platform built using Spring Boot microservices, Kafka, Docker, Kubernetes, and Helm.
This project demonstrates:
- Microservices architecture
- Asynchronous communication using Kafka
- API Gateway pattern
- Kubernetes deployments with Helm
- Horizontal scalability
- Service-to-service communication
- Containerized deployment workflow
flowchart LR
Client --> APIGateway
APIGateway --> Inventory
APIGateway --> Booking
Booking --> Kafka
Kafka --> Order
Inventory --> PostgreSQL
Booking --> PostgreSQL
Order --> PostgreSQL
Responsible for:
- Venue management
- Event management
- Inventory availability
POST /api/v1/inventory/addVenue
POST /api/v1/inventory/addEvent
GET /api/v1/inventory/event/{id}
GET /api/v1/inventory/eventsResponsible for:
- Handling booking requests
- Validating availability
- Publishing booking events to Kafka
POST /api/v1/bookingWhen a booking request is received:
- Validates inventory availability
- Creates booking entry
- Publishes booking event asynchronously to Kafka
Responsible for:
- Consuming booking events from Kafka
- Creating downstream order records asynchronously
This service demonstrates event-driven architecture and asynchronous processing.
Acts as:
- Single entry point for all client requests
- Request router for backend microservices
Example routes:
/api/v1/inventory/**
/api/v1/booking/**Client
↓
API Gateway
↓
Booking Service
↓
Kafka Topic
↓
Order Service
- Java
- Spring Boot
- Spring Cloud Gateway
- Spring Data JPA
- Apache Kafka
- Zookeeper
- PostgreSQL
- Docker
- Docker Compose
- Kubernetes
- Helm
- Microservices-based architecture
- Kafka-based asynchronous communication
- Horizontal scalability support
- Kubernetes-native deployment
- Helm-based one-command deployment
- Dockerized services
- Internal service discovery
- API Gateway pattern
- Event-driven workflow
This project supports horizontal scaling for all core microservices:
- Inventory Service
- Booking Service
- Order Service
- API Gateway
flowchart LR
Client --> APIGateway1
Client --> APIGateway2
APIGateway1 --> Booking1
APIGateway1 --> Booking2
APIGateway2 --> Booking1
APIGateway2 --> Booking2
Booking1 --> Kafka
Booking2 --> Kafka
Kafka --> Order1
Kafka --> Order2
Inventory1 --> PostgreSQL
Inventory2 --> PostgreSQL
Booking1 --> PostgreSQL
Booking2 --> PostgreSQL
Order1 --> PostgreSQL
Order2 --> PostgreSQL
Kubernetes replica scaling can be configured through Helm values.
Example:
replicaCount: 3This allows the system to:
- handle increased traffic
- distribute load
- improve fault tolerance
- scale services independently
docker-compose up --builddocker-compose downhelm install my-release event-booking-system-charthelm upgrade my-release event-booking-system-charthelm uninstall my-releaseThe Helm chart deploys:
- Inventory Service
- Booking Service
- Order Service
- API Gateway
- Kafka
- Zookeeper
- PostgreSQL
Services communicate internally using Kubernetes DNS.
Examples:
inventory:8000
booking:8001
kafka-broker:9092
postgresql:5432
Kafka is used to decouple services and enable asynchronous communication.
- Booking Service
- Order Service
- Loose coupling
- Better scalability
- Improved resilience
- Asynchronous processing
Docker images are published for all services.
Example:
prateekwayne/inventory-service
prateekwayne/booking-service
prateekwayne/order-service
prateekwayne/apigateway-service
Planned enhancements:
- Distributed tracing
- Centralized logging
- Retry & Dead Letter Queue handling
- Prometheus + Grafana monitoring
- CI/CD pipeline
- Authentication & authorization
- Rate limiting
- Kubernetes Ingress support
This project was built to practice:
- Spring Boot microservices
- Event-driven architecture
- Kafka integration
- Docker containerization
- Kubernetes deployments
- Helm chart packaging
- Internal networking & service discovery
- Horizontal scaling concepts
Prateek Verma
