Linking Container in AWS Fargate

后端 未结 2 556
借酒劲吻你
借酒劲吻你 2021-02-01 14:45

I try to setup a little example on AWS Fargate and try to have one application container with one database container there.

The task definition starts both containers, b

相关标签:
2条回答
  • 2021-02-01 15:24

    Containers in Fargate tasks share a network namespace, so you don't need to use links at all. You can simply communicate via localhost.

    For example, if you have container A running a web server on port 8000, container B could reach it with curl http://localhost:8000/

    0 讨论(0)
  • 2021-02-01 15:46

    You can probably set it up so the services can communicate over the public IP address with each other, then secure the ports using a VPC only the services can communicate with themselves on.

    0 讨论(0)
提交回复
热议问题