In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "what is a docker cluster?". In daily operation, I believe that many people have doubts about what a docker cluster is. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts about "what is a docker cluster?" Next, please follow the editor to study!
What is a docker cluster? A cluster is a group of service entities that work together (can be understood as servers) to provide a service platform that is more scalable and available than a single service entity. From the client's point of view, a cluster is like a service entity, but in fact the cluster is composed of a set of service entities.
In docker cluster services, it is necessary to be clear about the following concepts.
Swarm
Swarm A cluster of hosts running Docker Engine.
Since v1.12, cluster management and orchestration functions have been integrated into Docker Engine. When Docker Engine initializes a Swarm or joins an existing Swarm, it starts Swarm Mode.
When Swarm Mode is not started, Docker executes container commands; after running Swarm Mode, Docker adds the ability to orchestrate service. Docker allows you to run both Swarm Service and separate containers on the same Docker host.
Node
Each Docker Engine in Swarm is a node, and there are two types of node:manager and worker.
In order to deploy the application to Swarm, we need to execute the deployment command on manager node, and manager node will disassemble the deployment task and assign it to one or more worker node to complete the deployment.
Manager node is responsible for performing orchestration and cluster management to maintain and maintain the desired state of Swarm. If there are multiple manager node in the Swarm, they will automatically negotiate and elect a leader to perform the orchestration task.
Woker node accepts and performs tasks assigned by manager node. Manager node is also a worker node by default, but it can be configured as manager-only node to be responsible for orchestration and cluster management.
Work node periodically reports its status and the status of the tasks it is performing to manager node so that manager can maintain the state of the entire cluster.
Service
Service defines the tasks to be performed on the worker node. The main orchestration task of swarm is to ensure that service is in the desired state.
Take an example of service: start a nginx service in swarm, using an image of nginx:latest with 3 replicas.
Manager node is responsible for creating the service. After analysis, it is known that three nginx containers need to be started, and the tasks of running containers are assigned according to the current status of each worker node. For example, two containers are running on worker1 and one container is running on worker2.
After running for a while, worker2 suddenly went down, and manager monitored the failure and immediately launched a new nginx container on worker3. This ensures that service is in the desired state of three replicas.
In short, swarm organizes clusters (cluster) as nodes (node); at the same time, one or more services (service) can be deployed on each node, and each service can include one or more container.
At this point, the study of "what exactly is a docker cluster" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.