Ride-Sharing Platform (Go + gRPC)
High-Throughput Real-Time Mobility Architecture
Low-latency ride hailing in Go with Geohash driver matching, WebSocket live tracking, Stripe payments, and K8s deployment.
Go Microservices
gRPC Protobuf
Redis GEO
Kubernetes HPA
The engineering problem
Core Challenge
Broadcasting real-time vehicle locations without overloading transactional databases.
Architecture Solution
Decoupled pings into Redis GEO + ephemeral WebSocket channels; only persist trip snapshots to MongoDB.
Resilience Guardrail
Auto-reconnect backoff with sequence numbers to eliminate duplicate location frames.
Service topology & IPC protocols
Driver Location Service
Ingests 10K/s GPS coordinates into Redis GEO
Matching Engine (Go)
Geohash radial proximity search (<10ms)
Trip Lifecycle Service
State machine managing requested/accepted/active
Payment Dispatcher
Stripe payment intents & fare calculation
- Matching — geohash indexing for sub-10ms driver discovery
- Location — WebSocket handling 10K+ coordinate updates
- Payments — Stripe with webhook signature verification
- Trips — state machine for ride lifecycles
- Notifications — RabbitMQ fanout push
Canonical event / payload contract
application/json{
"tripId": "trip_901a88",
"driverId": "drv_4421",
"passengerId": "usr_9910",
"coordinates": { "lat": 23.8103, "lng": 90.4125 },
"geohash": "wh0r6t",
"status": "ACCEPTED",
"timestamp": 1788279120
}