# 为什么是etcd

"etcd"这个名字源于两个想法，即 unix "/etc" 文件夹和分布式系统"d"istibuted。 "/etc" 文件夹为单个系统存储配置数据的地方，而 etcd 存储大规模分布式系统的配置信息。因此，"d"istibuted 的 "/etc" ，是为 "etcd"。

etcd 以一致和容错的方式存储元数据。分布式系统使用 etcd 作为一致性键值存储，用于配置管理，服务发现和协调分布式工作。使用 etcd 的通用分布式模式包括领导选举，[分布式锁](https://godoc.org/github.com/coreos/etcd/clientv3/concurrency)和监控机器活动。

## 使用案例

* CoreOS 的容器 Linux: 在[Container Linux](https://coreos.com/why)上运行的应用程序获得自动的不宕机 Linux 内核更新。 容器 Linux 使用[locksmith](https://github.com/coreos/locksmith)来协调更新。locksmith 在 etcd 上实现分布式信号量，确保在任何给定时间只有集群的一个子集重新启动。
* [Kubernetes](http://kubernetes.io/docs/whatisk8s) 将配置数据存储到etcd中，用于服务发现和集群管理; etcd 的一致性对于正确安排和运行服务至关重要。Kubernetes API 服务器将群集状态持久化在 etcd 中。它使用etcd的 watch API监视集群，并发布关键的配置更改。

## 功能和系统比较

TODO


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doczhcn.gitbook.io/etcd/index/index-2/why.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
