Users in Europe complain about latency. You're asked to deploy the app to a second region. What changes?
AdvancedScenarioMulti-env and multi-account
Answer
Situation read → The stateless tier is the easy part. The real questions are where the data lives, how writes work, and how users get routed.
What I'd do →
- Check first whether a CDN (CloudFront) for static and cacheable API responses solves most of it; it's far cheaper.
- If not, deploy the stateless tier in
eu-west-1from the same Terraform and GitOps config (another cluster in the ApplicationSet). - Data options:
- Read-heavy: a cross-region read replica (Aurora Global Database) with writes going to the primary region.
- Write-heavy and global: DynamoDB global tables or a data model partitioned by user region.
- Routing: Route 53 latency-based routing with health checks, so users go to the nearest healthy region.
- Check data residency rules; EU user data may need to stay in the EU, which can drive the design.
- Observability per region, and a runbook for failing one region over to the other.
Why → Moving compute closer only helps if the data each request needs is also close.
Interview tip → Ask "is it reads or writes that are slow?"; that question decides the data design.
More on Multi-env and multi-account
Design the AWS account structure for a 50-engineer startup that's growing fast.IntermediateHow do you promote the same build from dev to staging to prod?BeginnerBugs keep passing staging and appearing in production. How do you make staging closer to prod?IntermediateHow do you structure Terraform for dev, staging and prod? Workspaces, directories or Terragrunt?IntermediateDevelopers want a preview environment for every pull request. How would you build it?AdvancedHelm values files or Kustomize overlays for per-environment config?Beginner