Raft And Etcd

  1. Process: The client sends a message to the server and the server responds back with a reply.

  2. leader election/log replication/election term(选举任期)

  3. If one of the servers has committed a log entry at a particular index, no other server can apply a different log entry for that index --- 如果其中一个服务器在特定索引上提交了日志条目,则其他任何服务器都不能为该索引应用其他日志条目。

    Raft ensures these properties are true at all times.

  4. term(任期)以选举(election)开始,然后就是一段或长或短的稳定工作期(normal Operation);log具有持久化durable、保序的特点,是大多数分布式系统的基石。

  5. logs由顺序编号的log entry组成 ,每个log entry除了包含command,还包含产生该log entry时的leader term。commit(committed)指日志被复制到了大多数节点后日志的状态;而apply(applied)则是节点将日志应用到状态机,真正影响到节点状态。

  6. The Stumbling Blocks : 绊脚石

Etcd (bbolt--key/value datastore)

  1. By default, etcdctl talks to the etcd server with the v2 API for backward compatibility. For etcdctl to speak to etcd using the v3 API, the API version must be set to version 3 via theETCDCTL_APIenvironment variable. A big change in v3 is the move to a flat keyspace and away from the “directory” based space of v2 --- v3中的一个重大变化是移动到一个平面的键空间,而不是v2中基于目录的空间。Be aware that there were some major changes from etcd2 to etcd3 (such as switching from HTTP to gRPC and using a flat data model(平面数据模型) instead of a hierarchical one), so it is important to specify which protocol version you want to use.
  2. We wanted something cloud-capable; something that could be reconfigured on the fly --- 我们想要一些支持云的东西; 可以在运行中重新配置的东西; We needed a database that could be reconfigured live without going down --- 我们需要一个可以实时重新配置而不停机的数据库
  3. BadgerDB written in go/ play.etcd.io
  4. Kubernetes uses etcdto store all the cluster information and is the only stateful component in the whole Kubernetes (we don't count in the stateful components of the application itself).
  5. etcdctl, which communicates with your local _etcd3 _cluster using the efficient gRPC protocol.

Raft Blogs

  1. Understanding the Raft consensus algorithm: an academic article summary
  2. RAFT Explained – Part 1/3: Introduction to the Consensus Problem
  3. Raft Consensus Algorithm
  4. Raft 为什么是更易理解的分布式一致性算法(各种失败情讨论)
  5. Raft Consensus Algorithm(GeeksforGeeks)
  6. 深入浅出 Raft - Membership Change

Etcd Blogs

  1. Understand Kubernetes 3 : etcd
  2. etcd:从应用场景到实现原理的全方位解读
  3. ETCD — Etcd Cluster Configuration For Kubernetes
  4. ETCD configuration example (master branch)
  5. ETCD configuration explanation

results matching ""

    No results matching ""