┌───────────────────────────────────────┐
│ Amazon Route 53 │
└───────────────────────────────────────┘
↓
┌───────────────────────────────────────┐
│ AWS CloudFront (CDN) + S3 (React) │
└───────────────────────────────────────┘
↓
┌────────────────────────────────────────────────────────┐
│ AWS ALB (Load Balancer) │
└────────────────────────────────────────────────────────┘
│ (HTTPS) │ (HTTPS/WebSockets)
┌─────────────────────────┐ ┌─────────────────────────┐
│ ECS Service (Backend) │ │ ECS Service (Socket.io) │
│ Node.js/Express + Auth │ │ Real-Time + WebRTC │
└─────────────────────────┘ └─────────────────────────┘
↓ ↓
┌────────────────────────────┐ ┌──────────────────────────────┐
│ Amazon RDS (PostgreSQL) │ │ Amazon ElastiCache (Redis) │
└────────────────────────────┘ └──────────────────────────────┘
1. DNS (Route 53) → CloudFront + S3 for static assets (React).
2. For API calls and real-time Socket.io connections, traffic goes to the Load Balancer (ALB).
3. Requests are routed to the appropriate ECS service task (backend REST or real-time instance).
4. These services communicate with RDS (PostgreSQL) for persistent data and ElastiCache (Redis) for caching and Pub/Sub.