Project
Voila Cabs platform scaling
99.9%+ uptime and thousands of concurrent users after replacing single-instance databases with clustered MySQL and sharded MongoDB on AWS.
99.9%+Uptime
1000sConcurrent users
3×DB replicas
5×Scale headroom
Context
- Product
- Ride-hailing platform — iOS/Android apps, web booking, driver admin panel.
- Constraint
- Single-instance MySQL and MongoDB. Single point of failure; peak-hour degradation under load.
- Requirement
- Clustered infrastructure with automatic failover — migration on live traffic, no user-visible cutover.
Role & scope
Started on iOS; moved to backend when infrastructure became the bottleneck. Owned database clustering, AWS deployment, and failover design.
- Designed 3-replica MySQL and MongoDB clusters with automatic primary promotion
- Implemented MongoDB sharding for write distribution on booking and location data
- Built AWS infrastructure for cluster hosting, monitoring, and elastic capacity
- Coordinated with mobile and web teams for zero user-visible migration
Key decisions
Replica clusters over vertical scaling
Three-replica clusters with hot secondaries enable automatic promotion on primary failure.
MongoDB sharding for write distribution
Booking and driver-location collections outgrew a single node. Sharding accepted for linear write scale.
AWS as hosting foundation
Cloud-native cluster management and monitoring without building ops tooling from scratch.
Architecture
┌──────────┐ ┌──────────┐ ┌──────────┐
│ Mobile │ │ Web │ │ Admin │
│ iOS/And. │ │ App │ │ Panel │
└────┬─────┘ └────┬─────┘ └────┬─────┘
└─────────────┼─────────────┘
▼
┌────────────────┐
│ API Layer │
│ Express · PHP │
│ Socket.io │
└───────┬────────┘
│
┌────────────┼────────────┐
▼ ▼ ▼
┌─────────┐ ┌─────────┐ ┌─────────┐
│ MySQL │ │ MongoDB │ │ Firebase│
│ 3-node │ │ sharded │ │ config │
│ cluster │ │ cluster │ │ │
└─────────┘ └─────────┘ └─────────┘
└────────────┬────────────┘
▼
┌───────────┐
│ AWS │
└───────────┘
Results
| 99.9%+ | Platform uptime after clustering |
| 1000s | Concurrent users without degradation |
| 0 | Data loss incidents after redundant backup architecture |
| 5–10× | Headroom for marketing-driven user growth |
Retrospective
- Would align infra investment with user-growth curve earlier — SPOF risk was latent until peak load.
- Failover testing should run on a schedule, not only after incidents.