Overview
The etcd v3 API is designed to give users a more efficient and cleaner abstraction compared to etcd v2. There are a number of semantic and protocol changes in this new API. For an overview see Xiang Li’s video.
To prove out the design of the v3 API the team has also built , there is a video discussing these recipes too.
Design
Flatten binary key-value space
-
- access to old version of keys
- user controlled history compaction
Support range query
- Pagination support with limit argument
- Support consistency guarantee across multiple range queries
Replace TTL key with Lease
- more efficient/ low cost keep alive
Replace CAS/CAD with multi-object Txn
- MUCH MORE powerful and flexible
RPC API supports the completed set of APIs.
- more efficient than JSON/HTTP
- additional txn/lease support
HTTP API supports a subset of APIs.
- easy for people to try out etcd
- easy for people to write simple etcd application
The max request size is around 1MB. Since etcd replicates requests in a streaming fashion, a very largerequest might block other requests for a long time. The use case for etcd is to store small configurationvalues, so we prevent user from submitting large requests. This also applies to Txn requests. We might loosenthe size in the future a little bit or make it configurable.