Overview
A robust, containerized microservices architecture on AWS serving as the backbone for the National Book Trust (NBT) Bookfair project.
01
Core Architecture
- ⚡Orchestration: AWS ECS (Elastic Container Service) using Fargate (Serverless compute)
- ⚡Service Mesh: 8 distinct microservices (auth, admin, ticket, visitor, volunteer, notification, whatsapp)
- ⚡Inbound Traffic: Managed by an AWS Application Load Balancer (ALB) with path-based routing (/auth/*, /ticket/*, etc.)
02
Infrastructure as Code (Terraform)
- ⚡Networking: Custom VPC with public/private subnets and security groups tailored for internal ECS-to-RDS/Redis traffic
- ⚡Database: Amazon RDS (PostgreSQL) for persistent storage
- ⚡Caching: Amazon ElastiCache (Redis) for high-speed data and session management
- ⚡Registry: AWS ECR for storing Docker images
- ⚡Observability: CloudWatch Log Groups configured for every service with 14-day retention
03
Messaging & Real-time
- ⚡Kafka: Dedicated EC2 instance (t3.medium for stability)
- ⚡Zookeeper: Manages Kafka state
- ⚡Fixes: Resolved ETIMEDOUT and EAI_AGAIN error by refining Kafka advertised listeners and security group rules
04
CI/CD & Strategy
- ⚡Task Definitions: Dynamic definitions in Terraform that inject shared environment variables
- ⚡Rolling Updates: Configured for zero-downtime (200% max, 50% min healthy)
- ⚡Build Optimization: Fixed Prisma binary mismatches inside Docker containers by ensuring correct engineType

