A brief introduction to distributed service registration and Discovery consul

Source: Internet
Author: User
Tags etcd apache mesos

Consul is an open source tool launched by Hashicorp to implement service discovery and configuration for distributed systems. Unlike other distributed service registration and discovery scenarios, the consul scenario is more "one-stop", with built-in service registration and discovery Framework, distributed conformance protocol implementations, health checks, Key/value storage, multi-datacenter scenarios, and no need to rely on other tools (such as zookeeper, etc.). It's also easier to use. Consul is implemented with Golang and therefore has natural portability (support for Linux, Windows, and Mac OS X); the installation package contains only one executable file for easy deployment and works seamlessly with lightweight containers such as Docker.

Consul Usage Scenarios

    • Registration and configuration sharing for Docker instances
    • Registration and configuration sharing for CoreOS instances
    • Vitess Cluster
    • Configuration sharing for SaaS apps
    • Integrates with CONFD services to dynamically generate Nginx and Haproxy configuration files

Advantages of Consul

    • Using the Raft algorithm to ensure consistency is more straightforward than a complex Paxos algorithm. In comparison, Zookeeper uses Paxos, while ETCD uses Raft.
    • Support multi-data center, internal and external network services using different ports for monitoring. A multi-data center cluster avoids single points of failure in a single data center, and its deployment requires consideration of network latency, fragmentation, and so on. Zookeeper and ETCD do not provide support for multi-datacenter functions.
    • Supports health checks. ETCD does not provide this functionality.
    • Supports HTTP and DNS protocol interfaces. The integration of the zookeeper is complex and the ETCD only supports the HTTP protocol.
    • Official web Management interface, Etcd no such function.

Comprehensive comparison, Consul as a new star of service registration and configuration management, it is worth to pay more attention and research.

The role of Consul

Client: Clients, stateless, forwarding HTTP and DNS interface requests to the server cluster within the LAN.
Server: Service side, save configuration information, high availability cluster, communicate with local clients in LAN, communicate with other data center via WAN. The number of servers per datacenter is recommended to be 3 or 5.

. NET client https://github.com/PlayFab/consuldotnet/, specific article reference https://playfab.com/blog/2015/05/19/porting-consul-go-api-c


Registering discovery for services using Apache Mesos and consul

Automating modern data centers with TerraForm and consul

Implementing distributed service registration and discovery using consul

A brief introduction to distributed service registration and Discovery consul

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.