etcd API version, usage and support

43 views
Skip to first unread message

Tom Evans

unread,
Jan 4, 2017, 6:29:59 AM1/4/17
to etcd-dev
Hi,

The v2 and v3 APIs are very different and so I'm looking for some guidance on which one to use for a new application.

- I assume that the recommendation would be to just use v3 for new applications?
- Which API is used most commonly in production at the moment? 
- Are there any reasons not to use the v3? (The lack of a REST endpoint is perhaps the obvious point)
- Is there a way to completely disable the v2 API endpoint? (since data added using v2 isn't visible using v3)
- Will the v2 API eventually be deprecated?

Thank you,
Tom

anthony...@coreos.com

unread,
Jan 4, 2017, 2:41:31 PM1/4/17
to etcd-dev
Hi,


> I assume that the recommendation would be to just use v3 for new applications?
Yes.


> Which API is used most commonly in production at the moment?
v2. It's been around longer.


- Are there any reasons not to use the v3? (The lack of a REST endpoint is perhaps the obvious point)
Backwards compatibility, I suppose. It's a major improvement over v2.

Also there's a REST endpoint for v3 through the grpc-gateway (granted, it's not as nice as v2's interface):
https://github.com/coreos/etcd/blob/master/Documentation/dev-guide/api_grpc_gateway.md


> Is there a way to completely disable the v2 API endpoint?
No. There's some internal etcd behavior that still depends on it. This should be an option in the future, though.


- Will the v2 API eventually be deprecated?
The storage backend, yes. In the future, the v2 API may be emulated using a proxy that talks to a v3 server so v2 apps aren't forced to upgrade but can still run on a recent version of etcd.
Reply all
Reply to author
Forward
0 new messages