ECS Service Discovery doesn't create multiple values in SRV record for ECS service task
There is possible to map only one value in SRV record for ECS Service Task and only one value will be registered in Service Discovery (Route53). Seems True for Bridge and AWSVPC modes
Enable multiple values in SRV record per ECS service tasks.
;; ANSWER SECTION:
servicename.localdns. 60 IN SRV 1 1 5000 11-922-33-83ab-444.servicename.localdns.
servicename.localdns. 60 IN SRV 20 20 5020 22-222-33-83-444.servicename.localdns.
servicename.localdns. 60 IN SRV 30 30 5030 33-33-33-83-444.servicename.localdns.
Only one value for SRV record registered by Service Discovery per Service task
ECS, agent ver. 1.28.1
a) From Service-Discovery-Considerations doc page:
...If you are using the Amazon ECS console, the workflow creates one service discovery service per ECS service. It maps all of the task IP addresses as A records, or task IP addresses and port as SRV records...
b) Route53 supports RFC2782 https://tools.ietf.org/html/rfc2782 and it is possible to create multiple values in SRV record.
@Java4all Can you please give us some more details about your services, their networking mode and the ports on each task? Do you have different clients discover and connect to different ports in the same ECS service?
Hi,
It was an idea to use App Mesh design (non AWS) and Service discovery with SRV records. Some of services have up to 200 ports exposed per container (for example 5000-5200), and network mode is awsvcp. So registration of service should include all SRV records (container-port) in Route53.
At the current state of app services, it is already sorted out by implementing of additional service discovery in env.
However, why it cannot be in AWS SD?
Thanks @Java4all for the details. Agree that if the service has multiple ports open, they all need to be put into AWS Cloud Map for discovery.
Hello, I was wondering what's the status of this issue and when can we expect to see it rollout to CloudMap and ECS. We are in need to expose SRV records per ECS service with many container:port combinations.
Most helpful comment
Thanks @Java4all for the details. Agree that if the service has multiple ports open, they all need to be put into AWS Cloud Map for discovery.