I've been diving into deployment options for my Spring Boot application, which is about 500MB in size. Since it's an API, I need it to be available all the time. I've heard that Fargate is good for small or batch applications, but I'm concerned about the costs of keeping it running 24/7. My understanding is that with Fargate, you pay based on execution time, so if the app needs to be constantly running, wouldn't that get expensive? I'd love to hear your thoughts and corrections if I'm off base!
5 Answers
Keep in mind that with ECS Fargate, you pay for the compute as long as your container is running. So for a 24/7 app, you'd be paying for 24/7 computing time, regardless of how many requests the app handles. Batch jobs are billed differently, as you only pay for the time the task is active.
If you don't use a load balancer with Fargate, you'd need to factor that cost in too. You might want to look at using App Runner instead.
Check out some of the AWS resources that break down the costs. You can play around with estimations there, and it might be super helpful for making a decision!
It depends on whether this is a personal project or for a business. Fargate can be pricier than EC2, especially because AWS handles all the OS-level maintenance now. For personal projects, I recommend sticking with EC2 if cost is a concern. But if it’s for a business, Fargate might be worth it since you don't have to manage AMI patching and all that hassle.
You might be able to run this on Lambda instead! It could be more cost-effective depending on your usage.
Related Questions
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically
[Centos] Delete All Files And Folders That Contain a String