Docker Swarm Mode Introduction and core concepts

What is the Docker Swarm

Docker Docker Swarm is a container arrangement official program for managing Docker containers across hosts, you can quickly expand to specify service levels, deploy, delete

A Docker Swarm cluster usually installed by multiple runs have Docker Docker Swarm Mode and host composition, role contains Managers (managers), Workers (execution node), and a node can have one or two roles

In Docker 1.12 before, the Swarm Docker container as a separate cluster scheduling software (Swarmkit) form, after it integrates with Docker together can be called Docker Swarm Mode

characteristic

  • Docker cluster management and integration - after Docker 1.12, Docker Swarm no longer as a separate cluster management software, but integrated directly into the Docker Engine.
  • To the center - you can Docker image deployment to one or more servers
  • Declarative Services mode - you can use declarative definition of a set of application stack
  • Extensions - you can specify the number of task (minimum size of Swarm), the simple understanding is the number of containers
  • Automatic adjustment of status (Desired state reconciliation) - Swarm Manager role will continue to check the status of the service and its replica, when a copy is not available, it will create a new copy of a copy of the replacement is not available, ensure availability
  • Multi-host network - when the designated cluster overlay network Swarm, Swarm automatically assigned overlay network ip container
  • Service Discovery - Docker Swarm managed node will assign a unique name and DNS load balancing service, Docker Swarm built-in DNS server
  • Load balancing - in addition to automatic load balancing, you can use the external exposure of custom port forwarding each load balancer service
  • The default secure communication - communication between nodes using the default mandatory TLS encryption, optional use self-signed certificates issued by the CA key or organization
  • Rolling Upgrades - upgrade process, it can configure the delay time of deployment, if problems arise, you can quickly restore the previous version

Docker Swarm mode core concepts

Nodes (Nodes)

Each added Docker Swarm host that is a node, which is the easiest to understand, each node can be a management node (Manager Nodes), can also be executed node (Worker Nodes), also combines these two roles

When deploying the service to Swarm cluster, you will be submitted to a Service Manager Nodes, Manager Nodes service will be split into (Swarm smallest size, it may contain only one container) Task, distributed to the Worker Nodes, Worker Nodes execute received the Task, deployment, Manager Nodes listening service status

Service and task (Services And Tasks)

Service defines a lot Task executed on Workers and Managers node node

Docker need to specify the mirror when you create a Service, and execution of commands or parameters when using replicated services when the mode, Manager node distribution quantity scale factor you specify a copy to the Task Worker nodes; use global services mode, the cluster was each Worker node creates a specified number of copy Task

Each Task carries a running application service container , scale factor Manager node number assigned to the Task execution node set, a Worker Task only run in one node, only two states of operation and failure

Load balancing (Load balancing)

Swarm Manager through the entrance load balancing ( Ingress the Load Balancing ) ports exposed as load balancing strategy

Manager assigns default port is unoccupied Service, called PublishedPort (You can also specify their own), range between 30000-32767, external service access Publishedport to access a running Task

Swarm will all requests within a cluster, the node is forwarded to the normal operation

Article content from official documents translated and understanding, if wrong, please feel free to leave a message also pointed out that, thank you

Guess you like

Origin www.cnblogs.com/hellxz/p/12134386.html