From fa7c77a6e06d4fd8f47b02d4c181230eb3b84585 Mon Sep 17 00:00:00 2001 From: darron froese Date: Mon, 31 Mar 2014 15:07:18 -0600 Subject: [PATCH] 2 nodes isn't durable - to be somewhat expected. So maybe we add this small documentation patch to show minimum 3 nodes. --- Documentation/cluster-discovery.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/cluster-discovery.md b/Documentation/cluster-discovery.md index d53684c4f..37b545b64 100644 --- a/Documentation/cluster-discovery.md +++ b/Documentation/cluster-discovery.md @@ -6,6 +6,8 @@ Starting an etcd cluster can be painful since each node needs to know of another Peer discovery for etcd is processed by `-discovery`, `-peers` and lastly log data in `-data-dir`. For more information see the [discovery design][discovery-design]. +Please note - at least 3 nodes are required for cluster durability. + ## Using discovery.etcd.io ### Create a Token @@ -24,6 +26,7 @@ Here's a full example: TOKEN=$(curl https://discovery.etcd.io/new) ./etcd -name instance1 -peer-addr 10.1.2.3:7001 -addr 10.1.2.3:4001 -discovery $TOKEN ./etcd -name instance2 -peer-addr 10.1.2.4:7002 -addr 10.1.2.4:4002 -discovery $TOKEN +./etcd -name instance3 -peer-addr 10.1.2.5:7002 -addr 10.1.2.5:4002 -discovery $TOKEN ``` ## Running Your Own Discovery Endpoint @@ -34,6 +37,7 @@ The discovery API communicates with a separate etcd cluster to store and retriev TOKEN="testcluster" ./etcd -name instance1 -peer-addr 10.1.2.3:7001 -addr 10.1.2.3:4001 -discovery http://10.10.10.10:4001/v2/keys/$TOKEN ./etcd -name instance2 -peer-addr 10.1.2.4:7002 -addr 10.1.2.4:4002 -discovery http://10.10.10.10:4001/v2/keys/$TOKEN +./etcd -name instance3 -peer-addr 10.1.2.5:7002 -addr 10.1.2.5:4002 -discovery http://10.10.10.10:4001/v2/keys/$TOKEN ``` If you're interested in how to discovery API works behind the scenes, read about the [Discovery Protocol](https://github.com/coreos/etcd/blob/master/Documentation/discovery-protocol.md).