<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Learning on etcd</title><link>https://deploy-preview-1113--etcd.netlify.app/docs/v3.3/learning/</link><description>Recent content in Learning on etcd</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://deploy-preview-1113--etcd.netlify.app/docs/v3.3/learning/index.xml" rel="self" type="application/rss+xml"/><item><title>etcd client architecture</title><link>https://deploy-preview-1113--etcd.netlify.app/docs/v3.3/learning/client-architecture/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-1113--etcd.netlify.app/docs/v3.3/learning/client-architecture/</guid><description>&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;etcd server has proven its robustness with years of failure injection testing. Most complex application logic is already handled by etcd server and its data stores (e.g. cluster membership is transparent to clients, with Raft-layer forwarding proposals to leader). Although server components are correct, its composition with client requires a different set of intricate protocols to guarantee its correctness and high availability under faulty conditions. Ideally, etcd server provides one logical cluster view of many physical machines, and client implements automatic failover between replicas. This documents client architectural decisions and its implementation details.&lt;/p&gt;</description></item><item><title>Client feature matrix</title><link>https://deploy-preview-1113--etcd.netlify.app/docs/v3.3/learning/client-feature-matrix/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-1113--etcd.netlify.app/docs/v3.3/learning/client-feature-matrix/</guid><description>&lt;h2 id="features"&gt;Features&lt;/h2&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Feature&lt;/th&gt;
 &lt;th&gt;&lt;code&gt;clientv3-grpc1.14&lt;/code&gt;&lt;/th&gt;
 &lt;th&gt;&lt;code&gt;jetcd v0.0.2&lt;/code&gt;&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;Automatic retry&lt;/td&gt;
 &lt;td&gt;Yes&lt;/td&gt;
 &lt;td&gt;.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Retry backoff&lt;/td&gt;
 &lt;td&gt;Yes&lt;/td&gt;
 &lt;td&gt;.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Automatic failover&lt;/td&gt;
 &lt;td&gt;Yes&lt;/td&gt;
 &lt;td&gt;.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Load balancer&lt;/td&gt;
 &lt;td&gt;Round-Robin&lt;/td&gt;
 &lt;td&gt;·&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;WithRequireLeader(context.Context)&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Yes&lt;/td&gt;
 &lt;td&gt;.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;TLS&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Yes&lt;/td&gt;
 &lt;td&gt;Yes&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;SetEndpoints&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Yes&lt;/td&gt;
 &lt;td&gt;.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;Sync&lt;/code&gt; endpoints&lt;/td&gt;
 &lt;td&gt;Yes&lt;/td&gt;
 &lt;td&gt;.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;AutoSyncInterval&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Yes&lt;/td&gt;
 &lt;td&gt;.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;KeepAlive&lt;/code&gt; ping&lt;/td&gt;
 &lt;td&gt;Yes&lt;/td&gt;
 &lt;td&gt;.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;MaxCallSendMsgSize&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Yes&lt;/td&gt;
 &lt;td&gt;.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;MaxCallRecvMsgSize&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Yes&lt;/td&gt;
 &lt;td&gt;.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;RejectOldCluster&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Yes&lt;/td&gt;
 &lt;td&gt;.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="kv"&gt;KV&lt;/h2&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Feature&lt;/th&gt;
 &lt;th&gt;&lt;code&gt;clientv3-grpc1.14&lt;/code&gt;&lt;/th&gt;
 &lt;th&gt;&lt;code&gt;jetcd v0.0.2&lt;/code&gt;&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;Put&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Yes&lt;/td&gt;
 &lt;td&gt;.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;Get&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Yes&lt;/td&gt;
 &lt;td&gt;.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;Delete&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Yes&lt;/td&gt;
 &lt;td&gt;.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;Compact&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Yes&lt;/td&gt;
 &lt;td&gt;.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;Do(Op)&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Yes&lt;/td&gt;
 &lt;td&gt;.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;Txn&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Yes&lt;/td&gt;
 &lt;td&gt;.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;For details, see the &lt;a href="https://pkg.go.dev/go.etcd.io/etcd/clientv3#KV" target="_blank" rel="noopener"&gt;KV API reference&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Data model</title><link>https://deploy-preview-1113--etcd.netlify.app/docs/v3.3/learning/data_model/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-1113--etcd.netlify.app/docs/v3.3/learning/data_model/</guid><description>&lt;p&gt;etcd is designed to reliably store infrequently updated data and provide reliable watch queries. etcd exposes previous versions of key-value pairs to support inexpensive snapshots and watch history events (“time travel queries”). A persistent, multi-version, concurrency-control data model is a good fit for these use cases.&lt;/p&gt;
&lt;p&gt;etcd stores data in a multiversion &lt;a href="https://en.wikipedia.org/wiki/Persistent_data_structure" target="_blank" rel="noopener"&gt;persistent&lt;/a&gt; key-value store. The persistent key-value store preserves the previous version of a key-value pair when its value is superseded with new data. The key-value store is effectively immutable; its operations do not update the structure in-place, but instead always generate a new updated structure. All past versions of keys are still accessible and watchable after modification. To prevent the data store from growing indefinitely over time and from maintaining old versions, the store may be compacted to shed the oldest versions of superseded data.&lt;/p&gt;</description></item><item><title>etcd v3 authentication design</title><link>https://deploy-preview-1113--etcd.netlify.app/docs/v3.3/learning/auth_design/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-1113--etcd.netlify.app/docs/v3.3/learning/auth_design/</guid><description>&lt;h2 id="why-not-reuse-the-v2-auth-system"&gt;Why not reuse the v2 auth system?&lt;/h2&gt;
&lt;p&gt;The v3 protocol uses gRPC as its transport instead of a RESTful interface like v2. This new protocol provides an opportunity to iterate on and improve the v2 design. For example, v3 auth has connection based authentication, rather than v2&amp;rsquo;s slower per-request authentication. Additionally, v2 auth&amp;rsquo;s semantics tend to be unwieldy in practice with respect to reasoning about consistency, which will be described in the next sections. For v3, there is a well-defined description and implementation of the authentication mechanism which fixes the deficiencies in the v2 auth system.&lt;/p&gt;</description></item><item><title>etcd versus other key-value stores</title><link>https://deploy-preview-1113--etcd.netlify.app/docs/v3.3/learning/why/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-1113--etcd.netlify.app/docs/v3.3/learning/why/</guid><description>&lt;p&gt;The name &amp;ldquo;etcd&amp;rdquo; originated from two ideas, the unix &amp;ldquo;/etc&amp;rdquo; folder and &amp;ldquo;d&amp;quot;istributed systems. The &amp;ldquo;/etc&amp;rdquo; folder is a place to store configuration data for a single system whereas etcd stores configuration information for large scale distributed systems. Hence, a &amp;ldquo;d&amp;quot;istributed &amp;ldquo;/etc&amp;rdquo; is &amp;ldquo;etcd&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;etcd is designed as a general substrate for large scale distributed systems. These are systems that will never tolerate split-brain operation and are willing to sacrifice availability to achieve this end. etcd stores metadata in a consistent and fault-tolerant way. An etcd cluster is meant to provide key-value storage with best of class stability, reliability, scalability and performance.&lt;/p&gt;</description></item><item><title>etcd3 API</title><link>https://deploy-preview-1113--etcd.netlify.app/docs/v3.3/learning/api/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-1113--etcd.netlify.app/docs/v3.3/learning/api/</guid><description>&lt;p&gt;This document is meant to give an overview of the etcd3 API&amp;rsquo;s central design. It is by no means all encompassing, but intended to focus on the basic ideas needed to understand etcd without the distraction of less common API calls. All etcd3 API&amp;rsquo;s are defined in &lt;a href="https://github.com/etcd-io/etcd/blob/v3.3.25/etcdserver/etcdserverpb/rpc.proto" target="_blank" rel="noopener"&gt;gRPC services&lt;/a&gt;, which categorize remote procedure calls (RPCs) understood by the etcd server. A full listing of all etcd RPCs are documented in markdown in the &lt;a href="https://deploy-preview-1113--etcd.netlify.app/docs/v3.3/dev-guide/api_reference_v3"&gt;gRPC API listing&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Glossary</title><link>https://deploy-preview-1113--etcd.netlify.app/docs/v3.3/learning/glossary/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-1113--etcd.netlify.app/docs/v3.3/learning/glossary/</guid><description>&lt;p&gt;This document defines the various terms used in etcd documentation, command line and source code.&lt;/p&gt;
&lt;h2 id="alarm"&gt;Alarm&lt;/h2&gt;
&lt;p&gt;The etcd server raises an alarm whenever the cluster needs operator intervention to remain reliable.&lt;/p&gt;
&lt;h2 id="authentication"&gt;Authentication&lt;/h2&gt;
&lt;p&gt;Authentication manages user access permissions for etcd resources.&lt;/p&gt;
&lt;h2 id="client"&gt;Client&lt;/h2&gt;
&lt;p&gt;A client connects to the etcd cluster to issue service requests such as fetching key-value pairs, writing data, or watching for updates.&lt;/p&gt;
&lt;h2 id="cluster"&gt;Cluster&lt;/h2&gt;
&lt;p&gt;Cluster consists of several members.&lt;/p&gt;
&lt;p&gt;The node in each member follows raft consensus protocol to replicate logs. Cluster receives proposals from members, commits them and apply to local store.&lt;/p&gt;</description></item><item><title>KV API guarantees</title><link>https://deploy-preview-1113--etcd.netlify.app/docs/v3.3/learning/api_guarantees/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-1113--etcd.netlify.app/docs/v3.3/learning/api_guarantees/</guid><description>&lt;p&gt;etcd is a consistent and durable key value store with &lt;a href="https://deploy-preview-1113--etcd.netlify.app/docs/v3.3/learning/api#transaction"&gt;mini-transaction&lt;/a&gt; support. The key value store is exposed through the KV APIs. etcd tries to ensure the strongest consistency and durability guarantees for a distributed system. This specification enumerates the KV API guarantees made by etcd.&lt;/p&gt;
&lt;h3 id="apis-to-consider"&gt;APIs to consider&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Read APIs
&lt;ul&gt;
&lt;li&gt;range&lt;/li&gt;
&lt;li&gt;watch&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Write APIs
&lt;ul&gt;
&lt;li&gt;put&lt;/li&gt;
&lt;li&gt;delete&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Combination (read-modify-write) APIs
&lt;ul&gt;
&lt;li&gt;txn&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="etcd-specific-definitions"&gt;etcd specific definitions&lt;/h3&gt;
&lt;h4 id="operation-completed"&gt;Operation completed&lt;/h4&gt;
&lt;p&gt;An etcd operation is considered complete when it is committed through consensus, and therefore “executed” -- permanently stored -- by the etcd storage engine. The client knows an operation is completed when it receives a response from the etcd server. Note that the client may be uncertain about the status of an operation if it times out, or there is a network disruption between the client and the etcd member. etcd may also abort operations when there is a leader election. etcd does not send &lt;code&gt;abort&lt;/code&gt; responses to clients’ outstanding requests in this event.&lt;/p&gt;</description></item><item><title>Learner</title><link>https://deploy-preview-1113--etcd.netlify.app/docs/v3.3/learning/learner/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-1113--etcd.netlify.app/docs/v3.3/learning/learner/</guid><description>&lt;h2 id="background"&gt;Background&lt;/h2&gt;
&lt;p&gt;Membership reconfiguration has been one of the biggest operational challenges. Let’s review common challenges.&lt;/p&gt;
&lt;p&gt;A newly joined etcd member starts with no data, thus demanding more updates from leader until it catches up with leader’s logs. Then leader’s network is more likely to be overloaded, blocking or dropping leader heartbeats to followers. In such case, a follower may election-timeout to start a new leader election. That is, a cluster with a new member is more vulnerable to leader election. Both leader election and the subsequent update propagation to the new member are prone to causing periods of cluster unavailability (see &lt;strong&gt;Figure 1&lt;/strong&gt; below).&lt;/p&gt;</description></item></channel></rss>