Struggling with ECS-EC2: Need Advice on Service Connectivity

0
5
Asked By CuriousCat218 On

Hey everyone! I'm pretty new to AWS, just about a month in, and I'd appreciate any insights you might have. My small team is jumping into microservices, and we're trying to host our services on an ECS-EC2 cluster. Cost is definitely a concern for us, so instead of using a Capacity Provider, we're manually attaching EC2 instances to have better control over resources.

We want to run two simple dotnet projects on the cluster to test if our services can communicate via APIs. However, we've hit a snag: we discovered that using the `awsvpc` network mode is not feasible since our EC2 instances have limited ENIs. So, we opted for `bridge` mode instead, but setting up Service Connect has proven to be quite complex. Sometimes Service A can reach Service B via HTTP, but then Service B can't reach back, and it's been pretty hit or miss.

I'm reaching out to see what options I have for troubleshooting this without breaking the bank. Also, I'd prefer not to just host a single container on a nano EC2 instance (to use `awsvpc`) since setting up Service Discovery that way seems much simpler. Any suggestions? Thanks!

2 Answers

Answered By CodeNinja42 On

If your projects are mainly in dotnet, why not try migrating to AWS Lambda? It might feel like a big shift, but it could save you a lot of headaches with infrastructure.

CuriousCat218 -

We’ve discussed Lambdas, but it feels too different from our current setup. Sticking to Docker containers feels more manageable for now.

Answered By TechExplorer99 On

Have you thought about using Fargate instead? It might simplify your deployment since it handles the infrastructure for you.

CuriousCat218 -

I considered it, but Fargate is pretty pricey for continuous use, even for light containers. I guess I just need to dive deeper into Service Connect for a solid fix. Thanks for the thought!

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.