Libcluster in docker on aws elastic beanstalk - can't create a cluster

I’ve never done it with Elastic Beanstalk, but I have gotten AWS Service Discovery to work with ECS Fargate and libcluster using this:

topologies = [
      ecs_app: [
        strategy: Cluster.Strategy.DNSPoll,
        config: [
          polling_interval: 1000,
          query: "phx-fargate.phx-fargate.local",
          node_basename: "phx_fargate"
        ]
      ]
    ]

Not sure if the DNS strategy might work better for you there. See this thread for more details: Distributed Elixir in Amazon ECS for more discussion. With AWS offering Service Discovery out of the box, you no longer need to mess around with A records and DNS entries. This is my config in the Service in ECS.

Screen Shot 2021-02-08 at 5.48.54 PM

Hope this was helpful.

7 Likes