0

For my containerized application, I want to Marathon to allocate the same host_port for the container's bridge network endpoint for all instances of that application. Specifying the host port runs the risk of resource exhaustion. Not specifying it will cause a random port to be picked for each instance.

I dont mind a randomly picked port so long as it is identical across all instances of my application. Is there a way to request Marathon to pick such a host port for my container endpoint.

1 Answers1

1

I think what you are really after is service discovery / load balancing. Have a look at the Marathon docs at

to get an overview.

Also, see the Docker networking docs at

You can probably either make use of the hostPort or the more general ports properties.

Tobi
  • 31,405
  • 8
  • 58
  • 90