chore: rename proxy mode to standby mode

It makes the name more reasonable.
This commit is contained in:
Yicheng Qin
2014-04-17 08:04:42 -07:00
parent 65b872c8b5
commit 67600603c5
11 changed files with 129 additions and 129 deletions

View File

@@ -1,24 +1,24 @@
## Proxies
## Standbys
Adding peers in an etcd cluster adds network, CPU, and disk overhead to the leader since each one requires replication.
Peers primarily provide resiliency in the event of a leader failure but the benefit of more failover nodes decreases as the cluster size increases.
A lightweight alternative is the proxy.
A lightweight alternative is the standby.
Proxies are a way for an etcd node to forward requests along to the cluster but the proxies are not part of the Raft cluster themselves.
Standbys are a way for an etcd node to forward requests along to the cluster but the standbys are not part of the Raft cluster themselves.
This provides an easier API for local applications while reducing the overhead required by a regular peer node.
Proxies also act as standby nodes in the event that a peer node in the cluster has not recovered after a long duration.
Standbys also act as standby nodes in the event that a peer node in the cluster has not recovered after a long duration.
## Configuration Parameters
Proxies require two additional configuration parameters: active size & promotion delay.
Standbys require two additional configuration parameters: active size & promotion delay.
The active size specifies a target size for the number of peers in the cluster.
If there are not enough peers to meet the active size then proxies are promoted to peers until the peer count is equal to the active size.
If there are more peers than the target active size then peers are demoted to proxies.
If there are not enough peers to meet the active size then standbys are promoted to peers until the peer count is equal to the active size.
If there are more peers than the target active size then peers are demoted to standbys.
The promotion delay specifies how long the cluster should wait before removing a dead peer and promoting a proxy.
The promotion delay specifies how long the cluster should wait before removing a dead peer and promoting a standby.
By default this is 30 minutes.
If a peer is inactive for 30 minutes then the peer is removed and a live proxy is found to take its place.
If a peer is inactive for 30 minutes then the peer is removed and a live standby is found to take its place.
## Logical Workflow
@@ -27,12 +27,12 @@ Start a etcd machine and join the cluster:
```
If peer count less than active size:
If machine already exists as a proxy:
Remove machine from proxy list
If machine already exists as a standby:
Remove machine from standby list
Join as peer
If peer count greater than or equal to active size:
Join as proxy
Join as standby
```
Remove an existing etcd machine from the cluster:
@@ -41,8 +41,8 @@ Remove an existing etcd machine from the cluster:
If machine exists in peer list:
Remove from peer list
If machine exists in proxy list:
Remove from proxy list
If machine exists in standby list:
Remove from standby list
```
Leader's active size monitor:
@@ -52,10 +52,10 @@ Loop:
Sleep 5 seconds
If peer count less than active size:
If proxy count greater than zero:
Request a random proxy to rejoin
If standby count greater than zero:
Request a random standby to rejoin
Goto Loop
If peer count greater than active size:
Demote randomly selected peer
Goto Loop