Multi-Tenant SaaS Platform
Production platform architecture for a multi-tenant, white-label SaaS product: tenant-scoped APIs behind ALB, a warm-pool EC2 fleet with Lambda autoscaler, ElastiCache Redis for cache and Streams, RDS MySQL, CloudFront + S3 for media, and Go + SQS workers for batch throughput. This case study maps how the pieces connect without customer-specific names.
Problem
A white-label edtech SaaS must serve many tenants from one platform without letting custom integrations, media delivery, or burst enrollment traffic compromise core API reliability or inflate operational toil.
Before and After
Before
- Legacy CDN and manual evening capacity scripts
- Synchronous APIs absorbed enrollment burst writes
- Fragmented webhook and payment reliability patterns
- Long batch jobs blocked API threads
- Asset delivery bottleneck on application servers
After
- ALB + warm-pool EC2 with Lambda autoscaler control plane
- CloudFront + S3 media path with 67% faster assets
- Redis Streams async domains + Go SQS workers for peak load
- Centralized webhook idempotency and payment hardening
- GitHub Actions CI/CD with ~10 min saved per build
Multi-Tenant SaaS on AWS
White-label edtech SaaS: tenant-scoped APIs behind ALB, warm-pool EC2 fleet, ElastiCache Redis for cache and Streams, RDS MySQL for tenant data, Lambda for control-plane automation, and CloudFront for media delivery.
Edge
Ingress
Compute
Data
Async
Media
What I Built
Ingress and compute
- ALB fronting warm-pool Node.js/TypeScript API fleet with WAF IP-set sync.
- Lambda autoscaler: desired-state tags, CPU ladder, IST schedules, self-healing.
- Tenant-scoped auth, SSO, and API keys at the edge.
Data and async tiers
- RDS MySQL primary store; Redis for cache + Streams event backbone.
- SQS + Go workers for batch transfers and long-running jobs.
- Background daily statistics cut live API response time 70%.
Delivery and compliance
- CloudFront migration from legacy CDN with coordinated cache policies.
- ISO 27001 and GDPR readiness contributions; VAPT remediation within SLA.
- Payment webhooks (Razorpay, Stripe, PayU) with duplicate safeguards.
Engineering Decisions
- Warm pool over ASG terminate - preserve stateful EC2 with stop/start only.
- Redis Streams on existing ElastiCache - pragmatic event backbone without new service ops.
- Go workers for throughput-heavy jobs - isolate from Node API event loop limits.
- Platform patterns over per-tenant forks - custom integrations plug into shared services.
By the Numbers
Warm pool ceiling
Up to 9 EC2 (prod: 7)
CDN improvement
67% asset response time
API P95 cut (hot path)
28.7% · 54% peak endpoint
Build time saved
~10 min per build
DR targets
RTO <15m · RPO <10m
Team scope
3-person infra/backend
Reliability and Ops
- Self-healing state machine replaces unhealthy instances before drain.
- Webhook idempotency and settlement alerting on payment providers.
- Disaster-recovery exercises validated sub-15-minute RTO.
Testing
- 271+ offline autoscaler tests (L1-L5) with dry-run production soak.
- Staging enrollment burst tests before academic peak seasons.
- CDN migration validated with before/after asset latency benchmarks.
What I Did
- 01Architected multi-tenant backend capabilities balancing customer integrations with reusable platform patterns.
- 02Operated warm-pool EC2 + Lambda autoscaler, Redis Streams async domains, and Go SQS workers as complementary tiers.
- 03Led CloudFront CDN migration (67% asset response improvement), webhook hardening, and ISO 27001 / GDPR readiness work.