AFAIK you cannot influence the order how Docker Swarm starts containers for services.

Is that possible with:

  • Mesos?
  • K8s (Kubernetes)?
  • Rancher?
  • Other?

This question is not about specific orchestration of dependent services but the problem that if you run 10 services each with one JVM this creates a load peak. The system slows down and you need complex loops to wait for other services. Are there any mechanisms known in other orchestration concepts to manage the startup somehow?

For example, in completely other domain, in JMeter you can tell a timeframe in which a thread group will start. So could I say "try to start this service with some offset"?

1 Answer 1



We do not support depends_on, and neither does Docker in Swarm mode. It is not a real solution to the problem anyway and leaves you with unhandled pointy-edge cases when failures occur and containers are being replaced. Your services should know how to either wait for their dependencies or exit and be rescheduled to retry.

I agree with this comment. Services should always be able to start. Imagine that one service goes down then another service will not work anymore.

  • and what if "my services" are 3rd party well-known apps... like Solr for example?
    – Ta Mu
    Commented Sep 15, 2017 at 9:23
  • Could you elaborate the current situation? So what is the current order of apps that need to be restarted and why do some services needed to be started first. Could you include this information in the question?
    – 030
    Commented Sep 15, 2017 at 9:25
  • I must admit we have to change our setup. Within solr container, we had sometimes configuration loaded after it is required, I did not know that. Thx - still I will give a note on other generic problem because of load peak as all services run sumulateneously.
    – Ta Mu
    Commented Sep 15, 2017 at 9:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.