简体   繁体   English

微服务中的服务发现与 docker 中的服务发现

[英]service discovery in microservices Vs service discovery in docker

I am a little confused about the difference between these two.我对这两者之间的区别有点困惑。 Docker swarm provides service discovery for the services that run in it. Docker swarm 为在其中运行的服务提供服务发现。 In a microservice architecture, each microservices run in one of the containers.在微服务架构中,每个微服务都在其中一个容器中运行。 Do I need a separate service discovery that is provided by some of the API Gateways or any service discovery frameworks like Eureka, Zookeeper, etc?我是否需要一些 API 网关或任何服务发现框架(如 Eureka、Zookeeper 等)提供的单独服务发现?

Is there any added advantage if I use some specific service discovery frameworks other than that is provided by Docker Swarm?如果我使用除 Docker Swarm 提供的特定服务发现框架之外,还有什么额外的优势吗?

Do I need a separate service discovery that is provided by some of the API Gateways or any service discovery frameworks like Eureka, Zookeeper, etc?我是否需要一些 API 网关或任何服务发现框架(如 Eureka、Zookeeper 等)提供的单独服务发现?

If your micro services are deployed as docker swarm services within the same swarm you don't need additional service discovery mechanism.如果您的微服务在同一个集群中部署为 docker 集群服务,则您不需要额外的服务发现机制。 Each docker service can connect to another by its service name.每个 docker 服务都可以通过其服务名称连接到另一个服务。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM