In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to understand replicated mode and global mode. The content of the article is of high quality, so the editor shares it for you as a reference. I hope you will have some understanding of the relevant knowledge after reading this article.
Swarm can flexibly adjust the number of container replicas through-replicas during the creation or operation of service, and the internal scheduler will start and stop containers on different node according to the resource usage of the current cluster, which is the default replicated mode of service. In this mode, there are more and less copies running on the node, and in general, the more resourced node runs more copies, and vice versa.
In addition to replicated mode,service, a globalmode is provided to force one and up to one copy to run on each node.
This mode is particularly suitable for cluster environments that need to run daemon. For example, to collect logs from all containers, you can global mode to create a service, run the gliderlabs/logspout container on all node, and even if a new node is added later, swarm will automatically start a copy of gliderlabs/logspout on the new node.
Docker service create\
-- mode global\
-- name logspout\
-- mount type=bind,source=/var/run/docker.sock,destination=/var/run/docker.sock\
Gliderlabs/logspout
You can view the mode of service through docker service inspect.
Here is Global. If you don't specify it when you create a service, the default is Replicated.
Whether using global mode or replicated mode, which node the replica runs on is determined by Swarm. As users, is it possible for us to finely control the running location of service?
On how to understand replicated mode and global mode to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
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.