You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: frontend/app/doc/tip/faq.component.html
+50-1Lines changed: 50 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,55 @@ <h3 md-subheader>More</h3>
19
19
20
20
<divclass="doc-group">
21
21
<router-outlet></router-outlet>
22
-
<p>Sorry, this page is still working in progress.</p>
22
+
23
+
<divclass="inner">
24
+
<divclass="block block-copy half">
25
+
<ahref="/doc/{{version.etcdVersionURL}}/faq#cap-theorem-in-etcd" class="faq-list">CAP theorem in etcd?</a>
26
+
</div>
27
+
<divclass="block block-copy half">
28
+
<ahref="/doc/{{version.etcdVersionURL}}/faq#remove-member-first" class="faq-list">Always remove first when replacing member?</a>
29
+
</div>
30
+
</div>
31
+
32
+
<br>
33
+
<hr>
34
+
<br>
35
+
36
+
<h2><ahref="/doc/{{version.etcdVersionURL}}/faq#cap-theorem-in-etcd" class="faq-title">CAP theorem in etcd?</a></h2>
37
+
<divid="cap-theorem-in-etcd"></div>
38
+
<p>
39
+
CAP often represents <i>Consistency</i>, <i>Availability</i>, <i>Partition tolerance</i>: you can only pick 2 out of 3. Since network partition is not avoidable, you are left with either consitency or availability when partition happens. That
40
+
is, systems with A and P are more tolerant of network faults, but possible to serve stale data. etcd chooses C and P to achieve linearizability with strong consistency.
41
+
</p>
42
+
<br>
43
+
44
+
<h2><ahref="/doc/{{version.etcdVersionURL}}/faq#remove-member-first" class="faq-title">Always remove first when replacing member?</a></h2>
45
+
<divid="remove-member-first"></div>
46
+
<p>
47
+
When replacing an etcd node, we recommend to remove the member first and then add its replacement. etcd employs distributed consensus based on a quorum model; (n+1)/2 members, a majority, must agree on a proposal before it can be committed to the cluster.
48
+
These proposals include key-value updates and membership changes. This model totally avoids any possibility of split brain inconsistency. The downside is permanent quorum loss is catastrophic.
49
+
</p>
50
+
<p>
51
+
How this applies to membership:
52
+
</p>
53
+
54
+
<p>
55
+
If a 3-member cluster has 1 downed member, it can still make forward progress because the quorum is 2 and 2 members are still live. However, adding a new member to a 3-member cluster will increase the quorum to 3 because 3 votes are required for a majority
56
+
of 4 members. Since the quorum increased, this extra member buys nothing in terms of fault tolerance; the cluster is still one node failure away from being unrecoverable.
57
+
</p>
58
+
59
+
<p>
60
+
Additionally, that new member is risky because it may turn out to be misconfigured or incapable of joining the cluster. In that case, there's no way to recover quorum because the cluster has two members down and two members up, but needs three votes to
61
+
change membership to undo the botched membership addition. etcd will by default (as of last week) reject member add attempts that could take down the cluster in this manner.
62
+
</p>
63
+
64
+
<p>
65
+
On the other hand, if the downed member is removed from cluster membership first, the number of members becomes 2 and the quorum remains at 2. Following that removal by adding a new member will also keep the quorum steady at 2. So, even if the new node
66
+
can't be brought up, it's still possible to remove the new member through quorum on the remaining live members.
0 commit comments