etcd is a distributed reliable key-value store for the most critical data of a distributed
system, with a focus on
being:
Simple: well-defined, user-facing API (gRPC)
Secure: automatic TLS with optional client cert authentication
Fast: benchmarked 10,000 writes/sec
Reliable: properly distributed using Raft
etcd is written in Go and uses the Raft consensus algorithm to manage a highly-available replicated log.
etcd is used in production by many companies, and the development team stands behind it in critical
deployment scenarios, where etcd is frequently teamed with applications such
as Kubernetes, locksmith, vulcand, Doorman, and many others. Reliability is further ensured by rigorous testing.
See etcdctl for a simple command line client.
etcd 是一个分布式键值对存储,设计用来可靠而快速的保存关键数据并提供访问,通过分布式锁,
leader选举和写屏障(write barriers)来实现可靠的分布式协作.etcd集群是为高可用,持久性数据存储
和检索而准备.
"etcd"这个名字源于两个想法,即unix中的"/etc" 文件夹和分布式系统"d"istibuted.
etc --存储文件配置存储
d --distribute
etcd--存储大规模分布式系统的配置信息
etcd以一致和容错的方式存储元数据,分布式系统使用etcd作为一致性键值存储,用于配置管理,服务
发现和协调分布式工作.使用etcd的通用分布式模式包括领导选举,分布式锁和监控机器活动.
2.使用案例
2.1 CoreOS 的容器
Linux: 在Container Linux上运行的应用程序获得自动的不宕机 Linux 内核更新。 容器 Linux 使用
locksmith来协调更新。locksmith 在 etcd 上实现分布式信号量,确保在任何给定时间只有集群的一个子
集重新启动。