简体   繁体   中英

Service discovery ecs aws

I am trying to connect from one container to another container by using service discovery for private network in ecs where I have used dynamic port mapping. I looked for this solution everywhere but I am not able to fine the solution. Help needed

ECS with EC2 launch type and Dynamic Port Mapping would mean SRV records for DNS resolution.

Service Discovery Considerations

If the task definition that your service task specifies uses the bridge or host network mode, an SRV record is the only supported DNS record type.

So DNS records for a service discovery service can be queried within your VPC. They use the following format

service_discovery_service name.service_discovery_namespace.


Querying the SRV record will return a set of IP addresses and ports per task. Once you have IP:Port, you can hit running application.

You can check out the sample application here which does the DNS resolution. Feel free to let me know if you have any specific issues/questions.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM