Josh
Josh

Reputation: 12791

Can etcd detect problems and elect leaders for other clusters?

To my knowledge, etcd uses Raft as a consensus and leader selection algorithm to maintain a leader that is in charge of keeping the ensemble of etcd nodes in sync with data changes within the etcd cluster. Among other things, this allows etcd to recover from node failures in the cluster where etcd runs.

But what about etcd managing other clusters, i.e. clusters other than the one where etcd runs?

For example, say we have an etcd cluster and separately, a DB (e.g. MySQL or Redis) cluster comprised of master (read and write) node/s and (read-only) replicas. Can etcd manage node roles for this other cluster?

More specifically:


In case it helps, here's a similar question for Zookeper.

Upvotes: 4

Views: 763

Answers (1)

Levi Ramsey
Levi Ramsey

Reputation: 20551

etcd's master election is strictly for electing a leader for etcd itself.

Other clusters, however can use a distributed strongly-consistent key-value store (such as etcd) to implement their own failure detection, leader election and to allow clients of that cluster to respond.

Etcd doesn't manage clusters other than its own. It's not magic awesome sauce.

If you want to use etcd to manage a mysql cluster, you will need a component which manages the mysql nodes and stores cluster state in etcd. Clients can watch for changes in that cluster state and adjust.

Upvotes: 4

Related Questions