算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
distributed-consensus【设计与创意】Distributed-systems architecture at the protocol level: consensus (Raft, Paxos, BFT), replication and quorums, consistency models, clock synchronization, and the CAP/PACELC trade-offs. Architect-level — how to make state agree and survive failures. USE WHEN: designing replicated/consensus systems, "Raft", "Paxos", "BFT", "quorum", "leader election",…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
name: distributed-consensus description: | Distributed-systems architecture at the protocol level: consensus (Raft, Paxos, BFT), replication and quorums, consistency models, clock synchronization, and the CAP/PACELC trade-offs. Architect-level — how to make state agree and survive failures.
USE WHEN: designing replicated/consensus systems, "Raft", "Paxos", "BFT", "quorum", "leader election", "consistency model", "linearizability", "CAP", "PACELC", "split-brain", replication topology, distributed state machines.
| Protocol | Fault model | Notes |
|---|---|---|
| Raft | Crash-fault (f of 2f+1) | Understandable, leader-based; default for etcd/Consul |
| (Multi-)Paxos | Crash-fault | Foundational, subtle; powers Spanner/Chubby lineage |
| BFT (PBFT, Tendermint) | Byzantine (f of 3f+1) | For untrusted/adversarial nodes; higher msg cost |
| Viewstamped Replication | Crash-fault | Raft-like, predates it |
Use crash-fault consensus inside a trust boundary; use BFT only when nodes can be malicious (cross-org, blockchain) — it costs more nodes and messages.
Linearizable → sequential → causal → eventual. Stronger = more coordination = higher latency / lower availability. Don't ask for linearizable if causal suffices.
Under a Partition choose C or A; else (no partition) trade Latency vs Consistency. Real systems are points on a spectrum (Spanner: CP + TrueTime clocks; Dynamo: AP). Clocks: avoid relying on wall-clock ordering; use logical / hybrid logical clocks, or bounded-uncertainty clocks (TrueTime) for external consistency.