Q: How would you design a system to handle 100,000 concurrent WebSocket connections on AWS?
Use API Gateway WebSocket API (scales automatically, no infra to manage). Each connection triggers Lambda functions for connect/disconnec...
#AWS #Cost & Architecture #L3 #Cloud #Infrastructure #ALB
🎙️ Candidate Opening & Architectural Context
""AWS reliability requires differentiating between AWS control plane limits and host-level resource exhaustion. When addressing this question, I walk the interviewer through our production incident runbook: isolating the blast radius, checking diagnostic logs and metrics, and applying a safe fix.""
Advertisement
🛠️ Production Runbook & Step-by-Step Resolution
1️⃣
Production Solution & Architecture
Use API Gateway WebSocket API (scales automatically, no infra to manage). Each connection triggers Lambda functions for connect/disconnect/message. Store connection IDs in DynamoDB. To broadcast: scan DynamoDB for connection IDs, call @connections endpoint for each. Use DynamoDB Streams + Lambda for fan-out. For >100k: consider using an ALB with ECS (NLB supports WebSockets with sticky sessions at high scale).
💡 The Senior SRE Gold Nugget (Key Architectural Takeaway)
"Pro-Tip: Use API Gateway WebSocket API (scales automatically, no infra to manage). Each connection triggers Lambda functions for connect/di."
⚡ 60-Second Elevator Pitch Talking Points
- Immediate Triage: Use API Gateway WebSocket API (scales automatically, no infra to manage). Each connection trigg
- Run targeted verification commands before modifying configuration.
- Automate permanent guardrails (CI check, alerts, IaC policy) to prevent recurrence.
Advertisement