[英]What is the different between putting a separate service discovery and integrate it into the cluster machine in Docker Swarm
I am having problem understanding the need of a separated service discovery server while we could register the slave node to the master node at the slave node start-up through whatever protocol. 我在理解分离的服务发现服务器的需求时遇到了问题,尽管我们可以通过任何协议在从节点启动时将从节点注册到主节点。 Hosting another service seem redundant to me.
托管另一个服务对我来说似乎是多余的。
Docker Swarm is there to create a cluster of hosts running Docker and schedule containers across the cluster. Docker Swarm可以创建一个运行Docker的主机集群,并在集群中调度容器。
It does not include service discovery , which is provided by a backend service, such as etcd, consul or zookeeper. 它不包括由后端服务(例如etcd,领事或动物园管理员)提供的服务发现 。
- The first problem: service registration and discovery is an infrastructure concern, not an application concern.
第一个问题:服务注册和发现是基础结构问题,而不是应用程序问题。
- The second problem: implementing service registration and discovery when infrastructure and application implementation are mutually agnostic is tough.
第二个问题:当基础架构和应用程序实现相互不可知时,很难实现服务注册和发现。
The DockerCon makes that distinction clear this morning (Nov. 16th, 2015) , with the "Docker Stack": DockerCon于今天早上(2015年11月16日)通过“ Docker Stack”使这一区别变得清晰:
(Graphics from @laurelcomics ) (来自@laurelcomics的图形)
Docker networking solves these problems by backing an interface (DNS) with pluggable infrastructure components that adhere to a common KV interface.
Docker网络通过支持具有可插拔基础架构组件的接口(DNS)来解决这些问题,该组件遵循通用KV接口。
You can see consul.io used in: 您可以看到consul.io用于:
getaddrinfo ENOTFOUN
D " getaddrinfo ENOTFOUN
D ” That means: 这意味着:
(Image from the " Easy routing and service discovery with Docker, Consul and nginx " article written by Ladislav Gazo ) (图片来自Ladislav Gazo撰写的“ 使用Docker,Consul和nginx轻松进行路由和服务发现 ”的图片)
The goal is to isolate what is an infrastructure concern (Discovery service) in its own container, separate from a dev tool concern (Swarm). 目标是在自己的容器中隔离基础设施问题(发现服务),与开发工具问题(Swarm)分开。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.