Course contentsShow
← System Design
Lesson 638 of 1,91917. Consensus AlgorithmsFree lesson

Configuration Management with Consensus

Using consensus-based systems to distribute configuration updates consistently across all nodes in a cluster.

Configuration Management with Consensus

What you'll learn: How consensus-based systems ensure configuration updates propagate consistently across all cluster nodes without conflicts or inconsistencies.

The Core Problem

Imagine updating a critical setting—like a load balancer's routing table or database connection string—across a 100-node cluster. If half the nodes get version A while the other half gets version B, your system behaves unpredictably. Configuration management means ensuring every node agrees on the current configuration at any point in time.

Why Consensus Matters

Traditional approaches like pushing config files or using a central database have problems:

  • Files can be edited on different nodes simultaneously (conflicts)
  • Central databases become single points of failure
  • Network partitions can leave nodes with different views

Consensus protocols like Raft or Paxos solve this by treating configuration as a replicated log. Every configuration change becomes a log entry that all nodes agree upon through the consensus protocol.

How It Works

When you update a configuration:

  1. The change is proposed to the consensus cluster (like etcd or ZooKeeper)
  2. The leader replicates it to followers via AppendEntries
  3. Once a majority acknowledges the entry, it's committed
  4. All nodes learn the new configuration in the same order

This is analogous to a team voting on rule changes—no rule takes effect until a majority agrees, and once accepted, everyone follows the same rule version.

Real-World Applications

  • etcd: Kubernetes stores cluster configuration (pod specs, service definitions) in etcd, which uses Raft consensus
  • Consul: Maintains service discovery and configuration data consistently
  • ZooKeeper: Manages configuration for distributed systems like Kafka and HBase

Key Takeaway: Consensus-based configuration management guarantees that all nodes see configuration updates in the same order and agree on the current state, eliminating race conditions and split-brain scenarios during config changes.