From a29f6fb7997dd1d489b0c1a70b4af8574943f4b9 Mon Sep 17 00:00:00 2001 From: Yicheng Qin Date: Mon, 16 Jun 2014 13:55:37 -0700 Subject: [PATCH] docs(configuration): add cluster configuration --- Documentation/configuration.md | 11 +++++++++++ server/cluster_config.go | 1 - server/usage.go | 3 +++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Documentation/configuration.md b/Documentation/configuration.md index 368fdd319..13bdab58c 100644 --- a/Documentation/configuration.md +++ b/Documentation/configuration.md @@ -41,6 +41,9 @@ configuration files. * `-peer-election-timeout` - The number of milliseconds to wait before the leader is declared unhealthy. * `-peer-heartbeat-interval` - The number of milliseconds in between heartbeat requests * `-snapshot=false` - Disable log snapshots. Defaults to `true`. +* `-cluster-active-size` - The number of expected peer-mode instances in the cluster. It is used only when the instance creates a new cluster. +* `-cluster-remove-delay` - The delay before one node is removed from the cluster since it cannot be connected at all. It is used only when the instance creates a new cluster. +* `-cluster-sync-interval` - The interval between synchronization for standby-mode instance with the cluster. It is used only when the instance creates a new cluster. * `-v` - Enable verbose logging. Defaults to `false`. * `-vv` - Enable very verbose logging. Defaults to `false`. * `-version` - Print the version and exit. @@ -76,6 +79,11 @@ bind_addr = "127.0.0.1:7001" ca_file = "" cert_file = "" key_file = "" + +[cluster] +active_size = 9 +remove_delay = 1800.0 +sync_interval = 5.0 ``` ## Environment Variables @@ -105,3 +113,6 @@ key_file = "" * `ETCD_PEER_CERT_FILE` * `ETCD_PEER_KEY_FILE` * `ETCD_PEER_ELECTION_TIMEOUT` + * `ETCD_CLUSTER_ACTIVE_SIZE` + * `ETCD_CLUSTER_REMOVE_DELAY` + * `ETCD_CLUSTER_SYNC_INTERVAL` diff --git a/server/cluster_config.go b/server/cluster_config.go index 61a747c81..1e6dca91b 100644 --- a/server/cluster_config.go +++ b/server/cluster_config.go @@ -25,7 +25,6 @@ const ( ) // ClusterConfig represents cluster-wide configuration settings. -// These settings can only be changed through Raft. type ClusterConfig struct { // ActiveSize is the maximum number of node that can join as Raft followers. // Nodes that join the cluster after the limit is reached are standbys. diff --git a/server/usage.go b/server/usage.go index 874b1ea07..ad3b707ab 100644 --- a/server/usage.go +++ b/server/usage.go @@ -56,6 +56,9 @@ Other Options: -max-cluster-size Maximum number of nodes in the cluster. -snapshot=false Disable log snapshots -snapshot-count Number of transactions before issuing a snapshot. + -cluster-active-size Number of active nodes in the cluster. + -cluster-remove-delay Seconds before one node is removed. + -cluster-sync-interval Seconds between synchronizations for standby mode. ` // Usage returns the usage message for etcd.