Service discovery is one of the key principles of micro-service architecture. Trying to configure each client or some form of convention can be very difficult and very fragile. Consul provides service discovery services through HT
Service discovery is one of the key principles of micro-service architecture. Trying to configure each client or some form of convention can be very difficult and very fragile. Consul provides service discovery services through HT
Service Discovery System consul1. What is consul?
Is a service management software.
Supports distributed, highly available, service discovery, and configuration sharing in multiple data centers.
This is a creation in
Article, where the information may have evolved or changed.
"Editor's note" This article compares three service discovery tools for zookeeper, ETCD, and Consul, and explores the best solution for service discovery, for informational purposes only.
If y
First, the basic introduction of consulConsul is an open source tool launched by Hashicorp to implement service discovery and configuration for distributed systems. Compared with other distributed service registration and discovery schemes, such as Airbnb's Smartstack, Consul's solution is more "one-stop", with built-i
changes (such as leader outage or loss of union). Before doing the following, make sure that the three nodes can ping each other and can ping the host. In addition, 192.168.31.178 and 192.168.31.179 serve as the client role and ping each other three virtual machines.Third, the official installation of consulYou can refer to the previous article installation method:. Netcore consul implement service registr
This is a creation in
Article, where the information may have evolved or changed.
The complete code of this article is shown in https://github.com/changjixiong/goNotes/tree/master/consulnotes, if the link is not shown in the text link is sent to be killed, please search to find the original reading.
What is Consul?
"Consul is a distributed, highly available, Datacenter-aware,
In the microservices architecture, each small service is composed of a number of nodes, the addition of nodes to remove the failure to be transparent downstream, it is necessary to introduce a service automatic registration and discovery mechanism, and Consul provides a complete solution, and built-in support for GRPC
conjunction with Consul to automatically register the service inside and start a Redis container test[[email protected] ~]# Docker run-d-P--name=redis redis[[email protected] ~]# Curl 192.168.0.239:8500/v1/catalog/servic Es{"Consul": [], "Redis": []}Consul now has a service
-cloud-starter-eureka and Spring-cloud-starter-consul-discovery
//Both include sub-annotations
@EnableDiscoveryClient
@SpringBootApplication Public
class Eurekaproviderapplication {public
static void Main (string[] args) { C5/>springapplication.run (Eurekaproviderapplication.class, args);
}
}
4, finally we need in the Application.properties configuration file, through the spring.application.name p
Copy it from here.************************************************************************************************Online to find are both ZK and ETCD comparison, and consul relatively few, this feeling is reliable, also seen in other places on the consul of The Spit Groove, recorded************************************************************************************************LeadIn a distributed micro-
In the microservices architecture, each small service is composed of a number of nodes, the addition of nodes to remove the failure to be transparent downstream, it is necessary to introduce a service automatic registration and discovery mechanism, and Consul provides a complete solution, and built-in support for GRPC
convenient than using curl.Https://www.consul.io/downloads_tools.htmlCalls can be made using many clients. The API is actually the same.
6, summary
The text of this text connection is: http://blog.csdn.net/freewebsys/article/details/56296013 not allowed to reprint without the Bo master.Bo main address is: Http://blog.csdn.net/freewebsys
Summed up, experience the next stand-alone version of the consul service.Just looked under the UI interface and
centerCreate a basic spring boot project, named Eureka-server, and introduce the required dependencies in the Pom.xml: Start a service registry with @enableeurekaserver annotations to provide conversations to other apps. This step is very simple, just add this annotation to a normal spring boot application to enable this feature, such as the following example:@EnableEurekaServer@SpringBootApplicationpublic class Application { public static void
A brief introduction of distributed service registration and Discovery ConsulConsul is an open source tool launched by Hashicorp company to realize the service discovery and configuration of distributed system. With other distributed services registration and Discovery Progr
First, Consul basic introductionConsul is an open source tool launched by Hashicorp to implement service discovery and configuration for distributed systems. Compared with other distributed service registration and discovery schemes, such as Airbnb's Smartstack, Consul's sol
.
Note: The following involves the deployment process all through the landlord I repeatedly verified, summed up. Everyone in the application process if there is a problem, you can leave a message to consult.
Ii. deployment of consul clusters
1, introduce consul
Consul Key FeaturesService discovery: Support for
Copyright NOTICE: This article for Bo Master original article, welcome reprint, reprint Please indicate the author, original hyperlink, Bo main address: Http://blog.csdn.net/forezp. http://blog.csdn.net/forezp/article/details/70245644Directory (?) [+]
Reprint please indicate the source:http://blog.csdn.net/forezp/article/details/70245644This article is from Fang Zhibong's blog
This article focuses on the spring Cloud Consul component, a
This article focuses on the spring Cloud Consul component, a tool that provides service discovery and configuration. The consul is distributed, highly available, and highly scalable.I. Introduction of ConsulConsul has the following properties:
Service
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.