Moving a Monolith to ECS Fargate: Cost and Architecture Dilemmas

0
5
Asked By TechExplorer42 On

I'm grappling with a tough decision about migrating our monolithic application (built primarily with PHP and Perl) to ECS with Fargate. We've been running fine on VMs so far, but now there's a push for us to adopt a serverless setup. We don't require auto-scaling or high availability, as those features have never been essential for us.

We're weighing two options: one is to deploy a single large container with about 8 vCPUs and 32 GB RAM that runs all our scripts together. I know this isn't the ideal container use but it's familiar to us. The other approach involves breaking everything down into numerous smaller containers, each might only utilize 0.25 vCPU and 1 GB RAM, but the estimated monthly cost for that ranges between $700 to $800 if we run it for about 8 hours a day, just on a development cluster.

In contrast, running one big container is much cheaper. Our current setup runs smoothly on a Linux distro with around 70 scripts functioning as systemd services. We're also concerned about ephemeral storage, as containers are temporary and Fargate operates the same unless we add EFS or use S3 for storage.

Given our minimal AWS experience and the uncertain funding for this migration, I'm unsure about the best path forward and whether it's feasible to refactor our code significantly to fit the ECS model. Management has chosen Fargate for compliance reasons related to HIPAA, so we're really looking for insights on how to navigate this migration without breaking the bank or straying too far from our existing architecture.

4 Answers

Answered By CloudGuru99 On

It sounds like you have a unique situation. Given the HIPAA compliance requirements, you really need to consult with an expert on that. Simply going serverless doesn’t automatically ensure compliance. Your current plan to either package everything into one large container or break it into smaller ones isn’t exactly how containers are usually optimized, especially with Fargate being a costlier option for a monolithic setup. Focus should be on understanding how HIPAA constraints affect your transition and whether you can simplify your architecture further without overwhelming costs in the short term.

Answered By ServerlessSage On

If you can dockerize your app, ECS should be manageable. It might be worth using tools like Terraform for your infrastructure. Whether you decide on one single large container or several smaller ones shouldn’t drastically affect your cost since it's really about the vCPU and vRAM you allocate. However, keep in mind that initial costs could be higher on Fargate compared to EC2, so take a close look.

Answered By DevOpsDynamo On

Starting with clarity on your objectives is key here. Since your main goal is to switch to a managed infrastructure that complies with HIPAA, you might find that running a big container on Fargate could actually suffice temporarily, even if it's not ideal. Fargate does come with its own storage limitations, but using EFS could be a safe bet for persistent storage. However, planning a proper migration strategy is crucial, so consider taking baby steps toward microservices later. Smaller containers do offer more scalability benefits, but if you're not set up for that yet, then your current plan might just be a step forward.

Answered By RefactorRanger On

Considering your scenario, moving to Amazon EKS might even be a better long-term solution if you're up for refactoring your code. It's all about planning your migration carefully to address both the code and the supporting infrastructure like CI/CD and logging. Just as important, ensure you set up controls for access and security to meet HIPAA requirements. A slow, strategic migration might be more beneficial than a rushed one.

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.