1. Define a serviceHttps://www.consul.io/docs/agent/services.htmlThis method is the most common way to provide services in a service registration.About the service definition: properties of the service we will each appear in the back of a summary one, and finally do a summary.2. Service Registration2.1. Create the folder where the service files are storedDescription
. D Suffix: Indicates the directory where a series of configuration files are stored (directory)
2.2. Create a servic
Spring.cloud.config.password=37cc5635-559b-4e6f-b633-7e932b813f73(5) Encryption and decryptionWhen using the cryptographic decryption feature, you need to install an unlimited version of JCE in the runtime environment of the configuration center. We can download it from Oracle's official website, which is a compressed package that you can see after extracting the following three files:Readme. TXT Local_policy.jar Us_export_policy.jarThe Local_policy.jar and Us_export_policy.jar two files are th
Reference Website cluster configuration methodhttps://hub.docker.com/r/progrium/consul/The cluster requires the manager and node to communicate consul's discovery service, otherwise, the management node cannot be elected and cannot execute the Docker command. Cluster in the consul work 3 machines, greater than 2 units, the cluster is still working, if, occurs only 1, the cluster fails, unable to select the
Note:Nginx version must be greater than or equal to 1.9,linux I am using version 7.0, remember to turn off the firewallStart text:Here only to mention the two more error-prone configuration, Consul,upsync,pcre Library, SSL library, zlib library configuration online A lot of not detailed (I was configured in the/usr/local)configuration of Nginx:cd/usr/local/wget http://nginx.org/download/nginx-1.9.10.tar.gzTAR-ZXVF nginx-1.9.10.tar.gzGroupadd NginxUser
Git2consul is a consul community project that loads files from a git repository into individual keys to consul. By default, the name of the key is the name of the file. Yaml and properties files support the. yml and. Properties file extensions, respectively. Set the Spring.cloud.consul.config.format property to files. For example:Bootstrap.ymlspring: cloud: consul
is to split a complete application from the data store vertically into multiple different services, each of which can be deployed independently, independently maintained, independently scaled, and invoked between services and services through, for example, restful APIs.For the "micro-service Architecture", we can find a lot of relevant introduction and research articles on the Internet to learn and understand. You can also read the ancestor Martin Fowler's "MicroServices" (Chinese version of tr
Consul is a service software that supports distributed, highly available service discovery and configuration sharing in multiple datacenters, developed by Hashicorp in the Go language, and open source based on the Mozilla Public License 2.0 protocol. Consul supports health checks and allows the HTTP and DNS protocol call APIs to store key-value pairs. Details:Https://www.consul.io/docs/internals/architectur
service configuration needs to be specifiedSpecifies that the service configuration is configured according to the aservice.ribbon.readtimeout=aservice.ribbon.ConnectTimeout= 3. Retry mechanismRibbon. maxautoretries=1Ribbon. Maxautoretriesnextserver=2Maxautoretries is set to 1, so the retry policy first attempts to access the preferred instance once, the instance access is not replaced after the failure, and the number of replacement instance accesses is set to 2 by the Maxautoretriesnextser
Several addresses in the consul command
(Jin Qing's column 2018.5)
The consul command line has the following address parameters:-bindbinding addresses, for cluster communications, default 0.0.0.0-clintbinding addresses, for RPC, DNS, HTTP and HTTPS, default 127.0.0.1-serf-lan-bindBinding Address for intranet trunking communication, using the default-bind address-serf-wan-bindBinding address for Cross room
-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 property to name the service, such as named Sp
{Deregistercriticalserviceafter= Timespan.fromseconds (5),//how long after the service is started, anti-registrationInterval = Timespan.fromseconds (Ten),//Health check interval, or heartbeat interval (the health of the Timing check service)HTTP = $"Http://{ip}:{port}/api/health",//Health Check AddressTimeout = Timespan.fromseconds (5)//time of registration of the service } }); }7) Set up the Health check controller HealthController.cs [Route ("Api/[controller]")]
1. Key/value effect
To modify a configuration file dynamically
Support for service collaboration
Establishment of leader elections
Provide service discovery
Integrated Health Check
2. Use2.1. View all Key/valueDescription
Use the? recurse parameter to specify to view multiple kv
No value--404
2.2. Add Key/valueDescription: Key--zjg/key1 value--' Test 'Description: flags--is used to add a meaningful metadata for any kv.Note: The top of this is probl
, we need to do some functional splitting of a service, splitting some of the functionality originally belonging to the Api-a service into another completely new service Api-a-part, and these split external call URL paths would want to conform to the rules/api-a/part/**.Zuul.routes.api-a.path=/api-a/* * zuul.routes.api-a.service-id=api-a zuul.routes.api-a-part.path=/ api-a/part/** Zuul.routes.api-a-part.service-id=api-a-partIn the source code, the routing rules are saved through Linkedhashmap, t
When we Bauku failure, we might as well try to use%5C to bypass ASP validation
Talk less, look at the following code:
Guest_user=trim (Request ("Guest_user"))Guest_password=trim (Request ("Guest_password"))Set rs= Server.CreateObject ("ADODB.
. Environment Repository 5.1.1. Git backend Bypass SSL certificate validation in git URI pattern matching and multiple repositories Set HTTP connection Timeout placeholder use AWS Codecommit for authentication authentication use the SSH configuration of the properties for the placeholder in the Git search path Force pull into the git repository to delete the 5.1.2 branch in the Git repository. Version-controlled back-end file systems use 5.1.3. File system back-end 5.1.4.
Next: Oracle Audit and Database Firewall (AVDF) Introduction1.Oracle AVDF Installation ConfigurationThe installation of Oracle Auditvault and Database firewall is somewhat cumbersome and requires a high level of hardware configuration for the installation environment. Because it is divided into audit Vault server and database Firewall, it requires at least 2 separate hosts for its installation deployment. Here's an example of the simplest inline mode
, but the overall performance is stable and there is no jitter. This is acceptable.
Based on Macvlan, we developed our own Ipam Driver plugin-based on consul.
When Docker creates a Macvlan network, it drives a consul that is designated for its own development. The IP of free and used is recorded in the consul. Such as:
The IPAM driver is present on each host an
overlay network to achieve container communicationDocker1.12 still inherits the overlay network model, and provides a strong network guarantee for its service registration discovery.Docke's registration Discovery principle is actually using a distributed key-value storage as the abstraction layer of storage. Docker 1.12 provides built-in Discovery services so that the cluster does not need to rely on external Discovery services such as consul or ETCD
Recently do project is about Docker network communication, need multiple host to carry on the link communication, here record, later easy project development, everybody need words also can look down, take a few detours.
Docker multi-Host network communication detailed
Docker supports multi-host network communication, and can establish a multiple host communication network through command line. This article uses the Docker machine and consul 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.