I am currently developing a cloud backup solution which involves up to 8 microservices developed in spring-boot and using mongo DB atlas as the persistence layer.
The microservices involve a Netflix ZUUL API gateway and Netflix Eureka as the service discovery mechanism. The microservices are required to talk to each other obviously.
The microservices are dockerized. So far I have been deploying them to an EC2 instance using a docker-compose file listing all the services and communication using docker networking
Now I have been trying to use ECS for deploying the microservices. I have been following the below link to creating the cluster etc. https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-cli-tutorial-ec2.html
My questions are as follows:
Should I create a task definition per microservice and deploy them to a common cluster or should there be a single task wherein I should have all the microservices coagulated together using the docker-compose file? How service discovery work in such a case?
Currently, the services talk to each other using feign proxy and eureka server. What is the best way to retain it as it is or what do you suggest? I earlier used Fargate and deployed the microservices but the service discovery and service registration was failing
Please guide my what is the best way to design the deployment of such an application in ECS