Consul makes it simple for services to register themselves, and to discover other service
Pairing service discovery with health checking prevents routing requests to unhealthy hosts, and enables services to easily provide circuit breakers.
Consul scales to multiple datacenters out of the box, with no complicated configuration.
Store hierarchical key/value configuration data for services.
Make use of Consul's built-in DNS server to resolve requests directly, avoiding expensive HTTP requests.
admin@hashicorp: dig web-frontend.service.consul. ANY
; <<>> DiG 9.8.3-P1 <<>> web-frontend.service.consul. ANY
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29981
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;web-frontend.service.consul. IN ANY
;; ANSWER SECTION:
web-frontend.service.consul. 0 IN A 10.0.3.83
web-frontend.service.consul. 0 IN A 10.0.1.109
admin@hashicorp:
Consul provides a flexible key/value store accessible via a simple HTTP API to store just about anything for your application.
admin@hashicorp: curl -X PUT -d 'bar' http://localhost:8500/v1/kv/foo
true
admin@hashicorp: curl http://localhost:8500/v1/kv/foo
[
{
"CreateIndex": 100,
"ModifyIndex": 200,
"Key": "foo",
"Flags": 0,
"Value": "aGVsbG8gd29ybGQK=="
}
]
admin@hashicorp: