Consul 介绍
欢迎查看操作指导,本向导是打开Consul的合适方式。 本文覆盖了Consul是什么,它能解决什么问题,它和现有软件的对比,以及你如何开始使用它。如果你熟悉Consul的基本使用方法, 这个 文档 提供了对于它的特性更加详细的说明。
什么是Consul?
Consul是一个分布式服务解决方案,提供服务发现,服务配置,服务分割等全功能的控制平台. 每个特性可被单独使用,也可以同时使用来建立一个完整的分布式服务。Consul需要一个数据平台 Consul requires a data plane and supports both a proxy and native integration model. Consul ships with a simple built-in proxy so that everything works out of the box, but also supports 3rd party proxy integrations such as Envoy.
The key features of Consul are:
- 服务发现: Consul客户端可以注册一个服务, 比如
api或者mysql, 并且其他客户端可以使用Consul来发现一个给定服务的服务提供者.通过DNS或者HTTP,应用可以非常容易的找到他们依赖的服务. - 健康检查: Consul clients can provide any number of health checks, either associated with a given service (“is the webserver returning 200 OK”), or with the local node (“is memory utilization below 90%”). This information can be used by an operator to monitor cluster health, and it is used by the service discovery components to route traffic away from unhealthy hosts.
- KV 存储: Applications can make use of Consul’s hierarchical key/value store for any number of purposes, including dynamic configuration, feature flagging, coordination, leader election, and more. The simple HTTP API makes it easy to use.
- 安全服务通信: Consul can generate and distribute TLS certificates for services to establish mutual TLS connections. Intentions can be used to define which services are allowed to communicate. Service segmentation can be easily managed with intentions that can be changed in real time instead of using complex network topologies and static firewall rules.
- 多数据中心: Consul supports multiple datacenters out of the box. This means users of Consul do not have to worry about building additional layers of abstraction to grow to multiple regions.
Consul is designed to be friendly to both the DevOps community and application developers, making it perfect for modern, elastic infrastructures.