BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Consul 0.7 Adds Atomic K/V Updates, ACL Replication and Improved Protocol Robustness

Consul 0.7 Adds Atomic K/V Updates, ACL Replication and Improved Protocol Robustness

Last week, Hashicorp released version 0.7 of Consul its open-source distributed service discovery and configuration tool. Tagged a "very large release", it introduces transactions for key/value updates, replication of ACLs across datacenters, improvements to its Raft and Gossip protocol implementations and optimisation of corresponding timings.

Consul has become an important part of modern distributed applications and datacenters. According to Hashicorp, "this release focused on making it easier to operate Consul clusters, and built key foundations for continued operational improvements in future releases." The changelog lists features, improvements and bug fixes, with the most important additions being:

Atomic Key/Value Updates

The new /v1/txn endpoint processes multiple updates on the Consul's key/value configuration data store from within a single, atomic transaction. A list of up to 64 key/value operations with a range of possible actions can be grouped into a single update. In addition to the usual read, set and delete actions, there are also lock manipulations, checks and conditional changes (check-and-set). The grouped updates are passed in as a JSON array. If any operations do not succeed, the entire transaction is rolled back and the results and errors are returned in an array.

Multi Datacenter ACL Replication

In multi datacenter Consul configurations, the new ACL replication feature allows to synchronise the full set of ACLs from the ACL datacenter to non-authoritative datacenters, guarding against network partitions. Previous to 0.7, ACLs in non-authoritative datacenters were only cached, leading to possibly incomplete ACLs during WAN outages.

Improved Robustness, Performance and Operations

  • Updates to the Raft library are improving processing of cluster membership changes and recovery after a loss of quorum. Moreover, the default Raft timing is claimed to now work better on lower-performance servers.

  • The Gossip protocol has been extended by a feature called Lifeguard to prevent degraded nodes that can't meet the soft real-time requirements "from erroneously causing serfHealth flapping in other, healthy nodes."

  • Consul agents periodically reconnect to available Consul servers in order to redistribute their query load.

  • Consul operators can use the operator command to manage the Raft configuration, such as inspecting the Raft configuration:

    consul operator raft -list-peers

    or manually removing stale servers from its peers without downtime:

    consul operator raft -remove-peer -address="127.0.0.1:8300"

The Consul upgrage guide goes into details of updating from specific versions to 0.7. Since it drops support for Consul protocol v1, the new release is incompatible to versions prior to 0.3.

Previous Consul updates this year added prepared queries with template support and an official Docker Consul image.

Rate this Article

Adoption
Style

BT