Which is the Best and Most Cost-Effective AWS Setup for 10,000 Concurrent Users?

0
0
Asked By TechGuru92 On

I'm building a dating platform using NestJS for the backend and PostgreSQL for the database. It involves multiple cron jobs, along with persistent connections like WebSockets and Server-Sent Events, plus payment gateway integrations. My goal is to support around 10,000 concurrent users, and I'm expecting this to grow over time. High availability is essential, I need to scale both up and down based on traffic spikes, and I want a cost-effective solution that doesn't compromise on reliability. I'm considering three options for deployment: AWS Fargate, ECS on EC2, or just plain EC2 instances. Which option would provide me with the best combination of performance, scalability, and cost efficiency?

4 Answers

Answered By CloudNinja08 On

Since your app seems to be containerized, if you're comfortable with EC2 and Auto-Scaling, you could run it on EC2 instances with Auto-Scaling based on CPU and Memory usage. Just note you'll need the CloudWatch agent for this. If you're not super experienced, Fargate might be better as it automatically scales ECS tasks based on the same metrics, albeit potentially at a higher cost. Also, consider using an Application Load Balancer (ALB) in front of your ECS service, possibly with sticky sessions. And don't forget to use RDS for your PostgreSQL database.

DevWhiz73 -

I get it; I've only dabbled in hosting Node.js and MySQL on EC2 and RDS for learning, so I didn't focus on cost or scalability much. Since this project is for a client, I'm keen to weigh all options regarding cost, scalability, and performance. I plan to hire a DevOps engineer, but want to grasp which option suits best before that.

Answered By WebDevWhiz On

From my experience, if you don't have a dedicated DevOps team, go for Fargate. It's user-friendly even though it may cost a bit more. If you’re looking for more control and are willing to manage the infrastructure yourself, then EC2 is the way to go, but it can be complex with deployments and scaling. ECS on EC2 gives you a good balance between control and ease of management.

Answered By CostSaver42 On

Typically, the cheapest option is whatever you manage yourself, so bare EC2 instances will always come in lowest, followed by ECS on EC2, and then fully managed options like Fargate. But if you're not familiar with running containers on EC2 and managing orchestration, Fargate is still a solid choice. Just keep an eye on costs as your user base grows, as you can't choose the CPU family with fully managed ECS, which can impact performance.

Answered By StartEasy99 On

I think starting with ECS Fargate is a smart move. You won’t have to manage EC2 instances or auto-scaling groups, which can simplify things a lot.

CodeMasterZ -

Absolutely! Starting with Fargate minimizes headaches at the beginning. Once you're set up with containerization and scaling, you can switch to other options as your needs grow.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.