- Newest
- Most votes
- Most comments
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.
Your proposed solution looks solid, especially given your current scale. Here are a few thoughts:
-
Multi-Region Architecture: It makes sense to deploy the Next.js app and the conversion microservice to multiple regions. This will help minimize latency for users accessing from different regions.
-
User Authentication: Your approach to handle user authentication and redirection based on the region is practical. Just ensure that the token handling is secure and efficient to avoid unnecessary delays during the redirection process.
-
Database Considerations: Since the Postgres DB is only storing account info, you’re right to avoid replication. Just keep an eye on the performance as user numbers grow, especially if login/logout spikes occur. You might want to consider using a caching layer for the auth info to reduce DB load.
-
Logging and Monitoring: With a multi-region setup, ensure you have centralized logging and monitoring. This will help you track issues across regions and provide insights into user behavior.
-
Future Scalability: It's great that you’re keeping scalability in mind. As your user base grows, consider strategies for database scaling, like read replicas or migrating to a managed service that supports multi-region replication.
Overall, it seems like a thoughtful design for your current needs. Just be prepared to adapt as you grow!
Relevant content
- asked 2 years ago
- asked 2 years ago
- asked 2 years ago