From f56c5455f326e70700f8ed2eafc62241e6264fb9 Mon Sep 17 00:00:00 2001 From: Xiang Li Date: Tue, 25 Aug 2015 11:22:08 -0700 Subject: [PATCH 1/2] doc: mention reconfiguration design in clustering.md --- Documentation/clustering.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/clustering.md b/Documentation/clustering.md index 25dd60cfd..7461a2bca 100644 --- a/Documentation/clustering.md +++ b/Documentation/clustering.md @@ -4,7 +4,7 @@ Starting an etcd cluster statically requires that each member knows another in the cluster. In a number of cases, you might not know the IPs of your cluster members ahead of time. In these cases, you can bootstrap an etcd cluster with the help of a discovery service. -Once an etcd cluster is up and running, adding or removing members is done via [runtime reconfiguration](runtime-configuration.md). +Once an etcd cluster is up and running, adding or removing members is done via [runtime reconfiguration](runtime-configuration.md). To better understand the design behind runtime reconfiguration, we suggest you read [this](runtime-reconf-design.md). This guide will cover the following mechanisms for bootstrapping an etcd cluster: From c30c85898e0c62c8cdd666c813af6487589fe5f6 Mon Sep 17 00:00:00 2001 From: Xiang Li Date: Tue, 25 Aug 2015 11:32:46 -0700 Subject: [PATCH 2/2] doc: add explanation for client urls --- Documentation/clustering.md | 2 ++ Documentation/configuration.md | 14 ++++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Documentation/clustering.md b/Documentation/clustering.md index 7461a2bca..7baec600e 100644 --- a/Documentation/clustering.md +++ b/Documentation/clustering.md @@ -38,6 +38,8 @@ Note that the URLs specified in `initial-cluster` are the _advertised peer URLs_ If you are spinning up multiple clusters (or creating and destroying a single cluster) with same configuration for testing purpose, it is highly recommended that you specify a unique `initial-cluster-token` for the different clusters. By doing this, etcd can generate unique cluster IDs and member IDs for the clusters even if they otherwise have the exact same configuration. This can protect you from cross-cluster-interaction, which might corrupt your clusters. +etcd listens on [`listen-client-urls`](configuration.md#-listen-client-urls) to accept client traffic. etcd member advertises the URLs specified in [`advertise-client-urls`](configuration.md#-advertise-client-urls) to other members, proxies, clients. Please make sure the `advertise-client-urls` are reachable from intended clients. A common mistake is setting `advertise-client-urls` to localhost or leave it as default when you want the remote clients to reach etcd. + On each machine you would start etcd with these flags: ``` diff --git a/Documentation/configuration.md b/Documentation/configuration.md index 245aaa6d2..26d0e1fea 100644 --- a/Documentation/configuration.md +++ b/Documentation/configuration.md @@ -32,12 +32,16 @@ To start etcd automatically using custom settings at startup in Linux, using a [ + default: "1000" ##### -listen-peer-urls -+ List of URLs to listen on for peer traffic. ++ List of URLs to listen on for peer traffic. This flag tells the etcd to accept incoming requests from its peers on the specified scheme://IP:port combinations. Scheme can be either http or https.If 0.0.0.0 is specified as the IP, etcd listens to the given port on all interfaces. If an IP address is given as well as a port, etcd will listen on the given port and interface. Multiple URLs may be used to specify a number of addresses and ports to listen on. The etcd will respond to requests from any of the listed addresses and ports. + default: "http://localhost:2380,http://localhost:7001" ++ example: "http://10.0.0.1:2380" ++ invalid example: "http://example.com:2380" (domain name is invalid for binding) ##### -listen-client-urls -+ List of URLs to listen on for client traffic. ++ List of URLs to listen on for client traffic. This flag tells the etcd to accept incoming requests from the clients on the specified scheme://IP:port combinations. Scheme can be either http or https. If 0.0.0.0 is specified as the IP, etcd listens to the given port on all interfaces. If an IP address is given as well as a port, etcd will listen on the given port and interface. Multiple URLs may be used to specify a number of addresses and ports to listen on. The etcd will respond to requests from any of the listed addresses and ports. + default: "http://localhost:2379,http://localhost:4001" ++ example: "http://10.0.0.1:2379" ++ invalid example: "http://example.com:2379" (domain name is invalid for binding) ##### -max-snapshots + Maximum number of snapshot files to retain (0 is unlimited) @@ -61,8 +65,9 @@ To start etcd automatically using custom settings at startup in Linux, using a [ ##### -initial-advertise-peer-urls -+ List of this member's peer URLs to advertise to the rest of the cluster. These addresses are used for communicating etcd data around the cluster. At least one must be routable to all cluster members. ++ List of this member's peer URLs to advertise to the rest of the cluster. These addresses are used for communicating etcd data around the cluster. At least one must be routable to all cluster members. These URLs can contain domain names. + default: "http://localhost:2380,http://localhost:7001" ++ example: "http://example.com:2380, http://10.0.0.1:2380" ##### -initial-cluster + Initial cluster configuration for bootstrapping. @@ -80,8 +85,9 @@ To start etcd automatically using custom settings at startup in Linux, using a [ + default: "etcd-cluster" ##### -advertise-client-urls -+ List of this member's client URLs to advertise to the rest of the cluster. ++ List of this member's client URLs to advertise to the rest of the cluster. These URLs can contain domain names. + default: "http://localhost:2379,http://localhost:4001" ++ example: "http://example.com:2379, http://10.0.0.1:2379" + Be careful if you are advertising URLs such as http://localhost:2379 from a cluster member and are using the proxy feature of etcd. This will cause loops, because the proxy will be forwarding requests to itself until its resources (memory, file descriptors) are eventually depleted. ##### -discovery