分布式系统中的数据一致性问题一直以来都是一个大难题。传统的解决方案包括 Zookeeper 和 Consul 等,虽然它们各自有优势,但也存在局限性,不能很好地满足现代微服务架构的高可用性和数据一致性的要求。etcd 在此背景下应运而生,采用了 Raft 共识算法来保证数据的强一致性,并在此基础上提供了稳定的服务发现和配置管理功能。
核心技术揭秘
etcd 的技术架构主要基于 Go 语言实现,采用 Raft 共识算法来保证数据一致性。其架构如下:
graph TD
A[客户端] --> B[etcd 节点]
B --> C[Raft 协议]
C --> D[多数节点共识]
D --> E{"写入数据"}
E -->|"成功"| F[数据持久化]
E -->|"失败"| G[重新提交]
B --> H[网络拓扑]
H --> I[节点发现]
I --> J[心跳检测]
Maintainers strive to shape an inclusive open source project culture where users are heard and contributors feel respected and empowered. Maintainers aim to build productive relationships across different companies and disciplines. Read more about Maintainers role and responsibilities.
Getting started
Getting etcd
The easiest way to get etcd is to use one of the pre-built release binaries which are available for OSX, Linux, Windows, and Docker on the release page.
For more installation guides, please check out operating etcd.
Running etcd
First start a single-member cluster of etcd.
If etcd is installed using the pre-built release binaries, run it from the installation location as below:
/tmp/etcd-download-test/etcd
The etcd command can be simply run as such if it is moved to the system path as below:
etcd contributors and maintainers meet every week at 11:00 AM (USA Pacific) on Thursday and meetings alternate between community meetings and issue triage meetings. Meeting agendas are recorded in a shared Google doc and everyone is welcome to suggest additional topics or other agendas.
Issue triage meetings are aimed at getting through our backlog of PRs and Issues. Triage meetings are open to any contributor; you don’t have to be a reviewer or approver to help out! They can also be a good way to get started contributing.
The meeting lead role is rotated for each meeting between etcd maintainers or sig-etcd leads and is recorded in a shared Google sheet.
Meeting recordings are uploaded to the official etcd YouTube channel.
Get calendar invitations by joining etcd-dev mailing group.
See CONTRIBUTING for details on setting up your development environment, submitting patches and the contribution workflow.
Please refer to community-membership.md for information on becoming an etcd project member. We welcome and look forward to your contributions to the project!
Please also refer to roadmap to get more details on the priorities for the next few major or minor releases.
See PR management for guidelines on how pull requests are managed.
etcd Emeritus Maintainers
etcd emeritus maintainers dedicated a part of their career to etcd and reviewed code, triaged bugs and pushed the project forward over a substantial period of time. Their contribution is greatly appreciated.
License
etcd is under the Apache 2.0 license. See the LICENSE file for details.
评论