--- description: |- Consul is a highly available and distributed service discovery and KV store designed with support for the modern data center to make distributed systems and configuration easy. ---

Service configuration made easy

Feature rich key/value store to easily configure services

Download Explore Docs

The Challenge

Runtime configuration management loses performace at scale.
<%= inline_svg 'consul-connect/svgs/configuration-challenge.svg' %>

Services have many runtime configurations, such as feature flags or maintenance modes, that need to be propagated in real time. Distributing these updates using configuration management or by re-deploying services can take minutes to hours. During these rollout periods, infrastructure can be out of sync and service configurations could be incorrect.

The Solution

Real-time runtime configuration for distributed applications.
<%= inline_svg 'consul-connect/svgs/configuration-solution.svg' %>

Consul can update service configurations across thousands of services in a globally distributed fleet in real-time. Configuration is stored in a hierarchical key/value store, and efficient edge triggers push changes out to applications quickly.

Features

Key/Value Store

Feature rich key/value store for dynamic service configuration data. Use it for feature flagging, maintenance modes, and more.

Learn more

Service Registry

Transaction Support

The key/value store supports both read and write transactions. This allows multiple keys to be updated or read as an atomic transaction. Changes to service configuration can be done atomically to minimize churn and avoid inconsistencies.

Learn more

$ curl http://localhost:8500/v1/txn \ --request PUT \ --data \ '[ { "KV": { "Verb": "set", "Key": "lock", "Value": "MQ==" } }, { "KV": { "Verb": "cas", "Index": 10, "Key": "configuration", "Value": "c29tZS1jb25maWc=" } } ]'

Blocking Queries / Edge-Triggered Requests

The Consul API supports blocking queries, allowing edge triggered updates. Clients use this to get notified immediately of any changes. Tools like consul-template allow configuration files to be rendered in real-time to third-party sources when any configuration changes are made.

Learn more

$ curl http://localhost:8500/v1/kv/web/config/rate_limit?wait=1m&index=229 [ { "LockIndex": 0, "Key": "web/config/rate_limit", "Flags": 0, "Value": "NjAw", "CreateIndex": 229, "ModifyIndex": 234 } ]

Watches

Watches use blocking queries monitor for any configuration or health status updates and invoke user specified scripts to handle changes. This makes it easy to build reactive infrastructure.

Learn more

$ consul watch \ -type=key \ -key=web/config/rate_limit \ /usr/local/bin/record-rate-limit.sh

Distributed Locks and Semaphores

The key/value store supports distributed locks and semaphores. This makes it easier for applications to perform leader election or manage access to shared resources.

Learn more

<%= inline_svg 'consul-connect/svgs/semaphores.svg', height: 383 %>

Case Studies

Ready to get started?

Download Explore docs
<% content_for :scripts do %> <% end %>