Architecture for multi-region ECS application
Hi everyone, I just wanted to get feedback on my proposed solution for a multi-region ECS dockerized app. Currently we have the following resources in Region A:
Postgres DB (Used for user accounts only)
Backend+Frontend NextJS App (Dockerized) ECS
Backend Microservice App for conversion of files (Dockerized) ECS
Backend 3rd party API + Datastore (This resource is also deployed in other regions) Unknown architecture
I now need to deploy to Regions B and C. The Backend 3rd party API is already deployed in these regions. I am thinking of deploying the following resources to the following regions:
Backend+Frontend NextJS App (Dockerized)
Backend Microservice App for conversion of files (Dockerized)
Our app logs in the user (authentication + authorization) using the 3rd party API, and after login we can see which region their data is in. So after login I can bounce them + their token to the appropriate region. I cannot use Route53 routing reliably because the Source of Truth about their region is available after login, and, for example, they may be (rarely) accessing from region B (if they are travelling) while their datastore is in region C (In which case I need to bounce them to region C). I also don't need to replicate our database to other regions because it only stores their account information for billing purposes, so the performance impact is minimal and only checked on login/logout.
Currently we have low 10s of users, so I can easily restructure and deploy a different architecture if/when we start scaling. Critique is welcome!
Hi,
Based on the use case that you have described; I see that you have a third-party API that does the login and routing to the different regions’ applications. Since we are unaware on the working of how this third-party API is architected to route the requests to the Apps in different regions and your use case involves bouncing between regions after the login, I am unable to provide any suggestions on that front. Here are some articles that illustrates the creation of Multi Region Container Application that include some interesting details and approaches when configuring a Multi Region Application in AWS.
Relevant questions
Moving to ECS-Fargate from EC2
asked 3 months agoyum fails on ecs ami
asked 3 years agoCloudformation Tags for ECS resources
asked 3 years agoCDK for ECS - Subnet and Architecture type
Accepted Answerasked 5 months agoCodePipeline with ECS Fargate using Graviton2 is failing
asked 6 months agoBlue/Green deployments in ECS & Service Mesh for services without ELB
Accepted Answerasked 2 years agoAre there any best practices for sending logs from ECS on EC2, ECS on Fargate and other AWS services such as API GW, load balancers (and more AWS services) to Splunk?
asked 2 months agoArchitecture for multi-region ECS application
asked 12 days agoMigrating Application from EC2 to Containers on AWS
Accepted Answerasked 7 months agoMove dockerized Jenkins server to AWS
Accepted Answerasked 3 years ago