HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Defined start sequence of containers

Submitted by: @import:stackexchange-devops··
0
Viewed 0 times
containerssequencedefinedstart

Problem

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"?

Solution

https://forums.rancher.com/t/start-order-of-stack-containers/3106/9


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.

Context

StackExchange DevOps Q#2016, answer score: 4

Revisions (0)

No revisions yet.