[Configuration Center] --- consul

mac download and install consul

1. Download: consul download address
2. Unzip to directory / usr / local / bin
3. Execute consul file
4. Verification: console input consul verification
5. Start consul: consul agent -dev

windows install consul

1. Download and unzip it to D: \ soft, add this path to the system environment variables.
2. Execute consul agent -dev on the cmd console
: http: // localhost: 8500

A brief introduction to consul

The consul can be used as a registration center (primary) and at the same time as a configuration center (secondary).

consul is written by go language

The bottom layer of consul implements the Raft consistency protocol, so in the cap, consul is cp, which means that the service may be stopped in a short period of time (raft election process), but at the expense of a little availability, the strong consistency is exchanged.

Raft related knowledge points
cap related knowledge points

Generally, consul is compared with euroke and zookeeper.

Spring-cloud generally uses euroke as the configuration center, because euroke is native, and the source code is java;
also use zookeeper as the configuration center, this is generally used before the project zk, so continue to use;
but later consul The community is more active than euroke, and many projects have been replaced by consul.

Published 203 original articles · praised 186 · 210,000 views

Guess you like

Origin blog.csdn.net/java_zhangshuai/article/details/104323662