Service Configuration Made Easy

Feature rich key/value store to easily configure services

Service configuration to push changes out in milliseconds

The Challenge

Runtime configuration management loses performance at scale

Before

  • Reduced productivity from managing and updating static configuration files for applications.

  • Increased risk with downtime disruption caused by prolonged convergence runs

  • Increased cost from the spending on config management tools

The Solution

Dynamic configuration across distributed services in milli seconds

After

  • Improve productivity by avoiding manual updates to thousands of service instances

  • Reduce risk by pushing consistent configuration changes across all distributed services in real-time

  • Reduce cost by eliminating the need for config management tools for runtime configuration

How Groupon Orchestrates Databases as a Service with HashiCorp Consul

Groupon provides centrally managed, containerized database instances to its engineering teams. To make this process faster, more robust, and operationally safe, they deliver Databases-as-a-Service via an orchestration layer backed by HashiCorp Consul.

Read Case Study

Service Configuration Features

Key/Value Store

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

Consul key/value store UI

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.

  1. $ curl http://localhost:8500/v1/txn \
  2. --request PUT \
  3. --data \
  4. '[
  5. {
  6. "KV": {
  7. "Verb": "set",
  8. "Key": "lock",
  9. "Value": "MQ=="
  10. }
  11. },
  12. {
  13. "KV": {
  14. "Verb": "cas",
  15. "Index": 10,
  16. "Key": "configuration",
  17. "Value": "c29tZS1jb25maWc="
  18. }
  19. }
  20. ]'

Block 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.

  1. $ curl http://localhost:8500/v1/kv/web/config/rate_limit?wait=1m&index=229
  2. [
  3. {
  4. "LockIndex": 0,
  5. "Key": "web/config/rate_limit",
  6. "Flags": 0,
  7. "Value": "NjAw",
  8. "CreateIndex": 229,
  9. "ModifyIndex": 234
  10. }
  11. ]

Watches

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

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

Distributed Locks & 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.

Consul Open Source and Enterprise Features

Learn more about service discovery, service segmentation and service configuration features with Consul Open Source and operations, governance, and multi-datacenter features with Consul Enterprise

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×