Infrastructure Architecture

Event Management Platform · Production-Ready · Scalable to Millions

🎯 Infrastructure Overview

Built on Google Cloud Platform for cost-effectiveness, scalability, and AI/ML capabilities.

₹60K
Monthly Cost (MVP)
₹2.4L
Monthly Cost (100K users)
₹12.4L
Monthly Cost (1M+ users)
90%
Managed Services

✨ Key Features

🚀 Serverless-First

Cloud Run for zero maintenance and automatic scaling from 0 to 1000+ instances.

💰 Cost-Optimized

Pay-per-use model with budget alerts and per-service spend caps to prevent surprises.

🧠 AI-Ready

Vertex AI integration with managed services for recommendations and analytics.

🇮🇳 India-Optimized

Mumbai region for low latency, RBI/DPDPA compliance, and Razorpay integration.

🎨 Technology Stack

Layer Technology Purpose
Frontend React.js (Next.js) + TypeScript Web application with SEO optimization
Mobile React Native / Flutter Cross-platform mobile apps
Backend Node.js (TypeScript) / Python (FastAPI) API services and business logic
Database (SQL) PostgreSQL (Cloud SQL) Transactional data, bookings
Database (NoSQL) Firestore Real-time updates, chat
Cache Redis (Memorystore) Session storage, hot data
Storage Cloud Storage Media files, backups
CDN Cloud CDN Global content delivery
Search Algolia → Elasticsearch Event/venue search
AI/ML Vertex AI + Cloud Run Recommendations, analytics

🏗️ System Architecture

Interactive architecture diagram showing data flow from users to backend services.

👥 User Layer
Web App
React.js + Next.js
Mobile Apps
React Native
🌐 Content Delivery
Cloud CDN
Global Edge Locations
₹3K - ₹1.2L/mo
Load Balancer
Cloud Load Balancing
₹2.5K - ₹60K/mo
🛡️ Security Layer
Cloud Armor
DDoS Protection + WAF
₹3K - ₹10K/mo
API Gateway
Cloud Endpoints
₹1.5K - ₹40K/mo
⚙️ Application Services
Auth Service
Cloud Run
Event Service
Cloud Run
Booking Service
Cloud Run
User Service
Cloud Run
Total Compute: ₹8K - ₹3L/mo
💾 Data & Cache Layer
PostgreSQL
Cloud SQL
₹12K - ₹2L/mo
Firestore
NoSQL Real-time
₹5K - ₹1.5L/mo
Redis
Memorystore
₹5K - ₹80K/mo
Cloud Storage
Object Storage
₹2K - ₹80K/mo
🔄 Background Processing
Pub/Sub
Message Queue
₹1K - ₹50K/mo
Cloud Functions
Serverless Jobs
₹1K - ₹25K/mo
AI/ML Models
Vertex AI
₹10K - ₹2.5L/mo
📊 Analytics & Monitoring
BigQuery
Data Warehouse
Monitoring
Cloud Monitoring
₹2.5K - ₹50K/mo

🔧 Infrastructure Components

Click on any component in the Architecture section for detailed specifications.

⚠️ CRITICAL GUARDRAILS
  • Budget alerts at 50%, 75%, 90% of monthly spend
  • Per-service spend caps to prevent runaway costs
  • Separate billing for prod/staging/dev environments
  • Weekly cost review (15 minutes every Monday)

Database Strategy

SQL vs NoSQL Decision Tree:
  • Transactional data (bookings, payments) → Cloud SQL (PostgreSQL)
  • Real-time data (event updates, chat) → Firestore
  • Analytics → BigQuery
  • Cached data → Redis (Memorystore)

Booking Flow (Zero Tolerance for Errors)

🎯 CRITICAL PATH:
  1. API Gateway (rate limit: 1 req/sec per user)
  2. Booking Service validates request
  3. PostgreSQL enforces capacity with DB-level constraints
  4. Payment processed with idempotency key
  5. Success → Queue background jobs (email, analytics)
  6. Fail → Immediate error (no side effects)

Rule: Database constraints prevent overbooking, even if app has bugs.

AI/ML Cost Control

Strategy Implementation Cost Impact
Feature Flags Gradual rollout (5-20% of users) -80% initial cost
User Quotas Free: 10 AI calls/day, Paid: 100/day Prevents spam
Async Processing Pre-compute recommendations nightly -80-90% vs real-time
Aggressive Caching Cache AI outputs for 7 days Free for repeat queries

💰 Cost Calculator

Estimate monthly infrastructure costs based on your scale.

Active Users 50,000
AI Features Usage Medium
Storage (TB) 5 TB
Estimated Monthly Cost
1,80,000
≈ $2,150 USD
💡 Cost Optimization Tips:
  • Committed Use Discounts: 25% off (1-year) or 52% off (3-year)
  • Preemptible Instances: 70-80% cheaper for ML training
  • Storage Lifecycle: Auto-move old data to Coldline (80% cheaper)
  • CDN Caching: Aggressive caching reduces bandwidth by 60%
  • Serverless First: Cloud Run scales to zero (no idle costs)

📈 Scaling Phases

Infrastructure evolution from MVP to enterprise scale.

Phase 1: MVP
0 - 10,000 Users

Timeline: Months 0-6

  • Cloud Run (2-4 services, min: 0 instances)
  • Cloud SQL (db-n1-standard-1, no replicas)
  • Memorystore Basic (1GB)
  • Single region (Mumbai)
  • Managed AI APIs only

Team: 1-2 developers

₹40K - ₹60K/month
Phase 2: Growth
10K - 200K Users

Timeline: Months 6-18

  • Cloud Run (8-10 services, min: 1-2 instances)
  • Cloud SQL (db-n1-standard-2 + 1 read replica)
  • Memorystore Standard HA (5GB)
  • Multi-regional CDN
  • Mix of managed AI + custom models
  • Staging environment added

Team: 3-4 engineers + 1 DevOps (part-time)

₹1.2L - ₹2L/month
Phase 3: Scale
200K - 1M+ Users

Timeline: Months 18+

  • Cloud Run (15-20 services) OR GKE Autopilot
  • Cloud SQL (db-n1-standard-4/8, HA + 2-3 replicas)
  • Memorystore Standard HA (20-50GB + replicas)
  • Multi-region deployment (Mumbai + Delhi)
  • Custom ML models + GPU instances
  • Elasticsearch on GKE (self-managed)
  • Advanced monitoring (distributed tracing)

Team: 8-12 engineers + 2-3 dedicated DevOps/SRE

₹4.5L - ₹8L/month

🚨 Traffic Spike Handling

During Large Events (10-100x normal traffic):

  • Auto-scaling: Cloud Run scales to 1000+ instances automatically
  • Database: Read replicas absorb read load
  • Cache: Pre-warm before event (99% cache hit rate)
  • CDN: Handles all static assets globally
  • Preparation: Increase min instances 24h before, load test 10x traffic

Cost Impact: +50-200% during event days (acceptable for revenue-generating events)

🔒 Security & Compliance

🛡️ NON-NEGOTIABLE SECURITY RULES
  1. No production access without MFA + VPN
  2. All secrets in Secret Manager (never in code)
  3. Quarterly access audits (remove unused access)
  4. Database uses private IP only (not public)
  5. Cloud Armor enabled (DDoS protection)
  6. Rate limiting on all public APIs
  7. Audit logging enabled on all critical services

India Data Compliance

Regulation Requirement Implementation
RBI Payment Rules Payment data in India Use Razorpay/Paytm (handles compliance)
DPDPA 2023 User consent, right to deletion Privacy policy + user data export/delete APIs
IT Act 2000 Cybersecurity measures Encryption, access control, incident response

Disaster Recovery Strategy

<1hr
Recovery Time (RTO)
Phase 3: Scale
<5min
Data Loss (RPO)
Real-time replication
7 days
Database Backups
Automated daily
2 regions
Geographic Redundancy
Mumbai + Delhi

Security Checklist

Before Launch:
  • ✅ MFA enabled for all team members
  • ✅ VPN configured for production access
  • ✅ Secrets moved to Secret Manager
  • ✅ Cloud Armor enabled (DDoS protection)
  • ✅ Rate limiting on all APIs
  • ✅ SSL/TLS on all connections
  • ✅ Audit logging enabled
Ongoing (After Launch):
  • Weekly security alerts review
  • Quarterly access audits
  • Monthly dependency updates (security patches)
  • Annual penetration testing