- Più recenti
- Maggior numero di voti
- Maggior numero di commenti
Hi Adit, I'm trying to answer your points:
-
"If the service task definition uses the bridge or host network mode, the SRV record is the only supported DNS record type. Create a SRV record for each service task. The SRV record must specify a container name and container port combination from the task definition." https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html Moreover as Cloud Map use SRV records is not possible to directly query the service name specified, the SVR record will container the HostName and Port and TTL of the record that you will have to connect to. For this reason the application need to be able to handle this specific logic. For example with bash script: use "nslookup" to retrive the HOSTNAME and PORT from the SRV record and then use a "curl" command to call the endpoint http://HOSTNAME:PORT
-
The Service Connect solution support ECS with bridge network mode and HTTP (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-connect-concepts.html) I think this would be the optimal solution if you are planning to use bridge network mode. It would be useful to have some log to double check why this solution is not working. Sometime, in my previous experiences, it could just be an issue with the creation of the endpoints. For connecting service "worker1" to service "worker2" running in a cluster with namespace "corp" you only need to use the name of the service and not the namespace:
http://worker1
insteadhttp://worker1/corp
. -
This is also a possible option, here you can see a working example https://aws.amazon.com/blogs/containers/migrate-existing-amazon-ecs-services-from-service-discovery-to-amazon-ecs-service-connect/. Service Connect will have the benefit to not rely on DNS records and this could be an important advantage because you don't need to worry about the DNS TTL and the caching layer of the DNS record at Container and Application level
Contenuto pertinente
- AWS UFFICIALEAggiornata un anno fa
- AWS UFFICIALEAggiornata 2 anni fa
- AWS UFFICIALEAggiornata 2 anni fa
Thanks Simone. Points Noted.