I'm currently working on developing WordPress websites for my company, and we recently transitioned to using containers on ECS Fargate from a more traditional EC2 setup. Over the past year, I've learned quite a bit about infrastructure and deployment through initiatives like The Cloud Resume Challenge and AWS Cloud Practitioner courses.
In my current setup, I've established a full VPC with RDS for databases, EFS for uploads, and ECS Fargate services for each website, alongside utilizing a modified Bitnami WordPress-Nginx docker image. I've integrated a CI/CD pipeline with GitHub Actions for automating plugin updates. However, I'm facing challenges with cost; each Fargate task can become pricey. Now, I'm considering switching to EC2 with ECS to potentially cut some costs while keeping the same overall structure.
I'm curious to hear advice on improving this architecture or deployment strategy. Is moving to EC2 a good idea, or should I look into other alternatives like EKS? Any insights would be appreciated. Cheers!
5 Answers
Your progress is quite inspiring! From what you've shared, Fargate does offer a lot of conveniences, but the costs can stack up, especially when scaling. Transitioning to EC2 could give you more control but requires managing AMIs and scaling strategies. Check out t4g.medium instances, they are cheaper and can handle multiple low-traffic WordPress containers. If you're looking at EKS, just be prepared for the steeper learning curve, but it could pay off in the long run if you have the resources!
Have you thought about using AWS App Runner? It's designed to make it easier to manage containerized applications and could simplify your stack compared to running everything through ECS/ALB.
Have you considered managed hosting solutions like WP Engine? They can save you a lot on costs and headaches related to infrastructure management. But, I get it — if you prefer having control over container management, that might not be your ideal route.
That's true, but the thing is with 50 client websites, managing updates across all of them was an issue with a managed solution. Building new images for deployment gives much more control in my case.
That sounds like an interesting journey! I did something similar recently with customers on CPanel, and I migrated them to AWS for better scalability and reliability. I used Cloudpanel and implemented custom scripts to manage EFS for shared storage. By keeping it behind an ASG with an ALB, we ensured that scaling is smooth when needed. Just a heads up, I found Varnish and Redis to be game-changers for performance, especially for page caching and object caching respectively. Have you thought about any of these solutions?
Sounds like a solid plan with your migration! Just make sure to monitor your EFS activity — from my experience, syncing files can get a bit tricky, especially if multiple instances are trying to access the same resource.
That setup sounds effective! It’s great to hear how you’re leveraging EFS without performance issues. For your concern about EFS performance, using caching layers like Redis can make a big difference, especially with multiple client websites. I also wonder if you considered how updates between instances are managed with shared storage.
If you're sticking with AWS but looking for alternatives, consider Google Cloud Run! It could simplify some of your processes. I have a personal project there, and it’s running pretty smoothly!
That’s cool! I’m using AWS for work currently, but definitely keeping GCP in mind for future projects since it offers some unique features.
That sounds potentially simpler, but isn’t App Runner a bit pricier? I'm already facing budget constraints!