0

Hey guys I have a strange problem with using multiple containers in docker-compose.

Adding additional containers slows down communication between them tremendously, later on some of them even "dissapear" (i.e. when trying to connect to them i get a 400 randomly).

I've removed the application from compose and just left there the microservices. I run the app manually after starting the compose (which maps the ports to localhost) and when using it like that those problems dissapear (at least the disseapering of the services).

When talking about the slowdown I made a test - I've just made the app (inside compose) communicate with one microservice (inside compose). Then after adding microservices that weren't used (there was no communication with them) just the fact of adding them to compose slowed down the communication between the app and microservice used lik 5-6x times when adding a few of them.

I'm using Mac - any idea what could be causing this? My coworker has identical problems (he also uses Mac).

  • Generally speaking of cause every new service do something on you machine. All of then competing for resources of your mac. Since network in docker is also software defined on you machine it also has impact. Does it help? – aholbreich Dec 08 '17 at 11:42
  • Still should it be so dire that random services start dying? – Marcin Gorczyński Dec 08 '17 at 14:29
  • We've did a test without docker-compose and it runs like an order of magnitude faster and the services/containers don't die off randomly – Marcin Gorczyński Dec 08 '17 at 15:26
  • Then please provide more details. Docker compose is just there to start stuff with docker and span docker network... So maybe providing more detail like docker-copose file and docker networks details as well the description of the alternative scenario without docker compose might help here. As sad overlay network can cause a lot of overhead: see: https://stackoverflow.com/questions/21889053/what-is-the-runtime-performance-cost-of-a-docker-container and https://stackoverflow.com/questions/21691540/how-to-optimize-performance-for-a-docker-container/21707838#21707838 – aholbreich Dec 08 '17 at 15:46
  • And forgot to ask. Does your service writes to disk maybe inside of container? This is typical show stopper. – aholbreich Dec 08 '17 at 15:51
  • Nope, just some config files are read from the disk when it starts. The compose is mostly: 1 app communicating via AMQP and HTTP, RabbitMQ and 5-10 microservices communicating via HTTP – Marcin Gorczyński Dec 08 '17 at 16:06

0 Answers0