术语 | 意思 |
---|---|
segment、fragment、shard | 这哥仨都一个意思 分片 剩下的需要意会 |
CAP | Consistency Avalability (Partition Tolerance) |
说在前面:
把存储、计算任务分担到普通的机器上,通过动态增加节点来应对数据量的增长,但缺点是多个节点的管理、任务的调度比较麻烦,这也是分布式系统研究和解决的问题。只有当数据量达到单机无法存储、处理的情况下才考虑分布式,不然都是自找麻烦。
先来点儿术语:
分片(segment、fragment、shard) 副本 一致性哈希 幂等 CAP paxos raft NWR lease 两阶段提交协议 三阶段提交协议 拜占庭问题
Raft
raft是一个共识算法(consensus algorithm),强一致性、去中心化、高可用的分布式协议
- 【1】Raft implements consensus by first electing a distinguished leader, then giving the leader complete responsibility for managing the replicated log. The leader accepts log entries from clients, replicates them on other servers, and tells servers when it is safe to apply log entries to their state machines. A leader can fail or become disconnected from the other servers, in which case a new leader is elected.
- 【Raft是consoul和etcd的核心算法】【从etcd的实战回头看】 【etcdv3 集群的搭建和使用,二进制搭建】
- 【图片描述讲解,不错】