Home > front end >  is docker-compose a self healing orchestrator?
is docker-compose a self healing orchestrator?

Time:12-22

In kubernetes, if a pod go down for some reason, the admission controller will restart it.

We call this mecanism self healing.

I have never worked with docker-compose, but I wonder : is it the same ?

CodePudding user response:

When deployed with docker-compose or now docker compose (with a space) you are deploying to a single node. You can define the service to automatically restart with a restart policy that handles a crashing application. However, there are a few scenarios where externalities like the network or volumes are not in a good state which I've seen cause the definition to be considered invalid by docker at which point it stops attempting to restart the service.

There's also Swarm Mode which is an orchestrator like Kubernetes, it can use the docker-compose.yml to define the target state, and it will continue to restart services to recover from an outage, and migrate them to another node when a node in the cluster goes down.

CodePudding user response:

  • docker-compose alone is NOT a true container orchestrator.
  • It is only a client that allows you to run a service and its dependencies as 1 unit. docker-compose does have a restart policy to restart a container if it crashes or something
  • If the node on which the container is running goes down, docker-compose will not be able to restart the container and you will face service interruption
  • Docker Swarm and Kubernetes are Servers and not just the clients so they are more comprehensive orchestrators
  • Related