0

We currently have a consumer service that calls producer processes in another container through docker exec (and exposed docker socket on the consumer service).

Question: How can such a docker exec call be load balanced onto containers running on multiple nodes?

Am I reading execute a command within docker swarm service correctly, in that this is not possible currently?

Michel Müller
  • 5,535
  • 3
  • 31
  • 49
  • 1
    I don't think it is a good idea to use `docker exec` for this use case. – Henry Aug 16 '19 at 10:37
  • I don't really care whether it's docker exec or something else, but it would be great to have a way to just run commands in a round-robin way across a docker swarm. Coming from HPC applications I thought this would be a no-brainer for a technology stack with that name... – Michel Müller Aug 16 '19 at 10:51
  • I tend to recommend job-queueing systems like RabbitMQ for this use case. `docker exec` can be fragile, has massive security implications, and just doesn’t work in this multi-host case you’re describing. – David Maze Aug 16 '19 at 14:06

0 Answers0