Merge pull request #6965 from gyuho/faq
Documentation: add more FAQs (follower, leader, sys-require)release-3.1
commit
8f88632218
|
@ -1,5 +1,11 @@
|
||||||
## Frequently Asked Questions (FAQ)
|
## Frequently Asked Questions (FAQ)
|
||||||
|
|
||||||
|
### etcd, general
|
||||||
|
|
||||||
|
#### Do clients have to send requests to the etcd leader?
|
||||||
|
|
||||||
|
[Raft][raft] is leader-based; the leader handles all client requests which need cluster consensus. However, the client does not need to know which node is the leader. Any request that requires consensus sent to a follower is automatically forwarded to the leader. Requests that do not require consensus (e.g., serialized reads) can be processed by any cluster member.
|
||||||
|
|
||||||
### Configuration
|
### Configuration
|
||||||
|
|
||||||
#### What is the difference between advertise-urls and listen-urls?
|
#### What is the difference between advertise-urls and listen-urls?
|
||||||
|
@ -10,6 +16,12 @@
|
||||||
|
|
||||||
### Deployment
|
### Deployment
|
||||||
|
|
||||||
|
#### System requirements
|
||||||
|
|
||||||
|
Since etcd writes data to disk, SSD is highly recommended. To prevent performance degradation or unintentionally overloading the key-value store, etcd enforces a 2GB default storage size quota, configurable up to 8GB. To avoid swapping or running out of memory, the machine should have at least as much RAM to cover the quota. At CoreOS, an etcd cluster is usually deployed on dedicated CoreOS Container Linux machines with dual-core processors, 2GB of RAM, and 80GB of SSD *at the very least*. **Note that performance is intrinsically workload dependent; please test before production deployment**. See [hardware][hardware-setup] for more recommendations.
|
||||||
|
|
||||||
|
Most stable production environment is Linux operating system with amd64 architecture; see [supported platform][supported-platform] for more.
|
||||||
|
|
||||||
#### Why an odd number of cluster members?
|
#### Why an odd number of cluster members?
|
||||||
|
|
||||||
An etcd cluster needs a majority of nodes, a quorum, to agree on updates to the cluster state. For a cluster with n members, quorum is (n/2)+1. For any odd-sized cluster, adding one node will always increase the number of nodes necessary for quorum. Although adding a node to an odd-sized cluster appears better since there are more machines, the fault tolerance is worse since exactly the same number of nodes may fail without losing quorum but there are more nodes that can fail. If the cluster is in a state where it can't tolerate any more failures, adding a node before removing nodes is dangerous because if the new node fails to register with the cluster (e.g., the address is misconfigured), quorum will be permanently lost.
|
An etcd cluster needs a majority of nodes, a quorum, to agree on updates to the cluster state. For a cluster with n members, quorum is (n/2)+1. For any odd-sized cluster, adding one node will always increase the number of nodes necessary for quorum. Although adding a node to an odd-sized cluster appears better since there are more machines, the fault tolerance is worse since exactly the same number of nodes may fail without losing quorum but there are more nodes that can fail. If the cluster is in a state where it can't tolerate any more failures, adding a node before removing nodes is dangerous because if the new node fails to register with the cluster (e.g., the address is misconfigured), quorum will be permanently lost.
|
||||||
|
@ -38,6 +50,12 @@ It is recommended to have an odd number of members in a cluster. An odd-size clu
|
||||||
|
|
||||||
Adding a member to bring the size of cluster up to an even number doesn't buy additional fault tolerance. Likewise, during a network partition, an odd number of members guarantees that there will always be a majority partition that can continue to operate and be the source of truth when the partition ends.
|
Adding a member to bring the size of cluster up to an even number doesn't buy additional fault tolerance. Likewise, during a network partition, an odd number of members guarantees that there will always be a majority partition that can continue to operate and be the source of truth when the partition ends.
|
||||||
|
|
||||||
|
#### Does etcd work in cross-region or cross data center deployments?
|
||||||
|
|
||||||
|
Deploying etcd across regions improves etcd's fault tolerance since members are in separate failure domains. The cost is higher consensus request latency from crossing data center boundaries. Since etcd relies on a member quorum for consensus, the latency from crossing data centers will be somewhat pronounced because at least a majority of cluster members must respond to consensus requests. Additionally, cluster data must be replicated across all peers, so there will be bandwidth cost as well.
|
||||||
|
|
||||||
|
With longer latencies, the default etcd configuration may cause frequent elections or heartbeat timeouts. See [tuning] for adjusting timeouts for high latency deployments.
|
||||||
|
|
||||||
### Operation
|
### Operation
|
||||||
|
|
||||||
#### How to backup a etcd cluster?
|
#### How to backup a etcd cluster?
|
||||||
|
@ -74,10 +92,13 @@ A slow network can also cause this issue. If network metrics among the etcd mach
|
||||||
|
|
||||||
If none of the above suggestions clear the warnings, please [open an issue][new_issue] with detailed logging, monitoring, metrics and optionally workload information.
|
If none of the above suggestions clear the warnings, please [open an issue][new_issue] with detailed logging, monitoring, metrics and optionally workload information.
|
||||||
|
|
||||||
|
[hardware-setup]: ./op-guide/hardware.md
|
||||||
|
[supported-platform]: ./op-guide/supported-platform.md
|
||||||
[wal_fsync_duration_seconds]: ./metrics.md#disk
|
[wal_fsync_duration_seconds]: ./metrics.md#disk
|
||||||
[tuning]: ./tuning.md
|
[tuning]: ./tuning.md
|
||||||
[new_issue]: https://github.com/coreos/etcd/issues/new
|
[new_issue]: https://github.com/coreos/etcd/issues/new
|
||||||
[backend_commit_metrics]: ./metrics.md#disk
|
[backend_commit_metrics]: ./metrics.md#disk
|
||||||
|
[raft]: https://raft.github.io/raft.pdf
|
||||||
[backup]: https://github.com/coreos/etcd/blob/master/Documentation/op-guide/recovery.md#snapshotting-the-keyspace
|
[backup]: https://github.com/coreos/etcd/blob/master/Documentation/op-guide/recovery.md#snapshotting-the-keyspace
|
||||||
[chubby]: http://static.googleusercontent.com/media/research.google.com/en//archive/chubby-osdi06.pdf
|
[chubby]: http://static.googleusercontent.com/media/research.google.com/en//archive/chubby-osdi06.pdf
|
||||||
[runtime reconfiguration]: https://github.com/coreos/etcd/blob/master/Documentation/op-guide/runtime-configuration.md
|
[runtime reconfiguration]: https://github.com/coreos/etcd/blob/master/Documentation/op-guide/runtime-configuration.md
|
||||||
|
|
Loading…
Reference in New Issue