A production-grade ride booking application deployed across AWS and GCP with real-time stream processing
A fully functional ride booking platform demonstrating:
- ✅ Multi-cloud architecture (AWS + GCP)
- ✅ Microservices (6 services across 2 clouds)
- ✅ Real-time streaming (Apache Flink on Google Dataproc)
- ✅ GitOps deployment (ArgoCD)
- ✅ Auto-scaling (HPA on EKS)
- ✅ Observability (Prometheus + Grafana + Loki)
- ✅ Load testing (k6)
Built for: BITS Pilani Cloud Computing Project (60 Marks)
Provider B: GCP (Dataproc + Firestore + Cloud Pub/Sub)
┌──────────────┐
│ Frontend │ (Next.js)
└──────┬───────┘
│
┌───▼──────────────────────────────────┐
│ AWS (Provider A) │
│ ┌─────────────────────────────────┐│
│ │ EKS Cluster (Kubernetes) ││
│ │ • User Service ││
│ │ • Driver Service ││
│ │ • Ride Service (HPA 2-8 pods) ││
│ │ • Payment Service ││
│ └─────────────────────────────────┘│
│ • RDS PostgreSQL │
│ • AWS Lambda (Notifications) │
│ • S3 (Object Storage) │
└─────────────┬────────────────────────┘
│
┌──────▼────────┐
│ Confluent │
│ Cloud Kafka │
│ │
└──────┬────────┘
│
┌─────────────▼────────────────────────┐
│ GCP (Provider B) │
│ ┌─────────────────────────────────┐│
│ │ Google Dataproc (Flink) ││
│ │ • Real-time aggregation ││
│ │ • Time-windowed processing ││
│ └─────────────────────────────────┘│
│ • Firestore (NoSQL Analytics) │
│ • Confluent Cloud (Managed Kafka) │
└──────────────────────────────────────┘
.
├── README.md # This file
├── QUICKSTART.md # 30-minute deployment guide
├── DEPLOYMENT.md # Comprehensive deployment instructions
├── ARCHITECTURE_SUMMARY.md # Architecture details & cost breakdown
├── GCP_MIGRATION_SUMMARY.md # GCP migration notes
│
├── backend/ # Microservices (Python FastAPI)
│ ├── user-service/ # User authentication & profiles
│ ├── driver-service/ # Driver management
│ ├── ride-service/ # Ride booking & matching
│ └── payment-service/ # Payment processing
│
├── frontend/ # Frontend application
│ └── nextjs-ui/ # Next.js web interface
│
├── infra/ # Infrastructure as Code
│ ├── aws/ # AWS Terraform (Provider A)
│ │ ├── main.tf # EKS, RDS, Lambda, S3
│ │ └── modules/ # Modular resources
│ └── gcp/ # GCP Terraform (Provider B)
│ ├── main.tf # Dataproc, Firestore
│ └── modules/ # Dataproc, Firestore modules
│
├── gitops/ # Kubernetes manifests
│ ├── user-service-deployment.yaml
│ ├── driver-service-deployment.yaml
│ ├── ride-service-deployment.yaml
│ ├── payment-service-deployment.yaml
│ └── argocd-apps.yaml # ArgoCD application definitions
│
├── analytics/ # Stream processing
│ └── flink-job/ # Apache Flink job (Java)
│
├── monitoring/ # Observability
│ └── grafana/ # Grafana dashboards
│
└── loadtest/ # Load testing scripts (k6)
- AWS Account + CLI configured
- GCP Account + CLI configured
- Docker, Terraform, kubectl, Helm installed
-
Deploy Infrastructure (10 min)
# AWS cd infra/aws cp terraform.tfvars.example terraform.tfvars # Edit terraform.tfvars terraform init && terraform apply # GCP cd ../gcp cp terraform.tfvars.example terraform.tfvars # Edit terraform.tfvars with your GCP project values (Pub/Sub is auto-provisioned) terraform init && terraform apply
-
Deploy Microservices (10 min)
# Build & push Docker images # Configure kubectl # Deploy via ArgoCD
-
Deploy Flink Job (5 min)
cd analytics/flink-job mvn clean package # Upload to Flink container via REST API
📖 See DEPLOYMENT.md for complete commands
Total: ~$0.27/hour = $6.48/day
- AWS: $0.17/hour (EKS, RDS, Lambda, S3)
- GCP: $0.10/hour (Dataproc, Firestore, Pub/Sub)
Development Cost (60 hours): ~$18-20
Demo Cost (10 hours): ~$3-4
💡 Tip: Destroy infrastructure when not in use!
| Requirement | Implementation | Status |
|---|---|---|
| 6 Microservices | user, driver, ride, payment, notification (Lambda), analytics (Flink) | ✅ |
| Multiple Clouds | AWS (Provider A) + GCP (Provider B) | ✅ |
| IaC | Terraform for all infrastructure | ✅ |
| Managed K8s | AWS EKS | ✅ |
| HPA | ride-service & user-service | ✅ |
| GitOps | ArgoCD | ✅ |
| Flink on Managed Cluster | Google Dataproc | ✅ |
| Managed Pub/Sub | Google Cloud Pub/Sub | ✅ |
| SQL Database | RDS PostgreSQL | ✅ |
| NoSQL Database | Firestore | ✅ |
| Object Storage | S3 | ✅ |
| Serverless | AWS Lambda | ✅ |
| Observability | Prometheus + Grafana + Loki | ✅ |
| Load Testing | k6 | ✅ |
- Language: Python 3.10+
- Framework: FastAPI
- Database: PostgreSQL (RDS)
- API: REST
- Framework: Next.js 14
- Language: TypeScript
- Styling: Tailwind CSS
- IaC: Terraform
- Container Orchestration: Kubernetes (EKS)
- CI/CD: GitOps with ArgoCD
- Container Registry: AWS ECR / Docker Hub
- Platform: Apache Flink 1.18
- Cluster: Google Dataproc
- Message Broker: Google Cloud Pub/Sub (rides + ride-results topics)
- Processing: Time-windowed aggregation
- Metrics: Prometheus + Grafana
- Logging: Loki + Promtail
- Alerting: Grafana Alertmanager
- Flink consumes ride events from Kafka
- Performs time-windowed aggregation (1-minute windows)
- Calculates rides per city in real-time
- Publishes results back to Kafka
- Stores aggregated data in Firestore
- HPA scales ride-service from 2→8 pods
- Based on CPU utilization (target: 70%)
- Tested with k6 load testing tool
- AWS for core application services
- GCP for analytics workload (Dataproc + Firestore)
- Confluent Cloud for managed Kafka messaging
- All deployments via ArgoCD
- Git as single source of truth
- Automatic sync from repository
- Prometheus scrapes metrics from all services
- Grafana dashboards for visualization
- Loki for centralized logging
README.md(this file) - Project overviewDEPLOYMENT.md- Comprehensive step-by-step instructions
# Health check
curl http://localhost:8003/health
# Book a ride
curl -X POST http://localhost:8003/ride/start -H "Content-Type: application/json" -d '{...}'cd loadtest
k6 run ride_service_test.jskubectl get hpa --watch
kubectl get pods -l app=ride-service --watchBy completing this project, you will learn:
- Multi-Cloud Architecture - Deploy across AWS & GCP
- Microservices Design - Build & deploy distributed systems
- Stream Processing - Real-time data processing with Flink
- Infrastructure as Code - Terraform for cloud resources
- Kubernetes - Container orchestration & auto-scaling
- GitOps - Modern deployment practices with ArgoCD
- Observability - Monitoring & logging best practices
- Load Testing - Performance testing & validation
- ✅ Production-Grade: Industry best practices
- ✅ Cost-Optimized: ~$20 total for development
- ✅ Well-Documented: Comprehensive guides
- ✅ Fully Automated: IaC + GitOps
- ✅ Scalable: HPA + Confluent Cloud Kafka + Flink
- ✅ Observable: Full monitoring stack
# Destroy GCP
cd infra/gcp && terraform destroy
# Destroy AWS
cd infra/aws && terraform destroy
# Note: Manually delete Confluent Cloud Kafka cluster from https://confluent.cloud- Detailed Guide: See
DEPLOYMENT.md - Troubleshooting: See
DEPLOYMENT.md→ Troubleshooting section
This project is for educational purposes as part of BITS Pilani Cloud Computing coursework.
Built with for Cloud Computing Project
BITS Pilani | 2024