Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

etcd vs consul #768

Closed
vtolstov opened this issue Mar 6, 2015 · 8 comments
Closed

etcd vs consul #768

vtolstov opened this issue Mar 6, 2015 · 8 comments

Comments

@vtolstov
Copy link

vtolstov commented Mar 6, 2015

Hi. I'm try to choose cluster manager for object storage engine.
So i read about etcd and consul.
I need: easy to boostrap cluster (ideally i don't want to know about all members, i have 2-3 nodes with persistent addresses, and 100 nodes that need to join to cluster and can vote for leader election (so in consul terminology it servers). Ideally C api/binding to simplify curl/dns dances. Able to detect current leader from external application. Automatic node adding and removing when node start/stop.

What is the main benefits in my cases of consul vs etcd?

@armon
Copy link
Member

armon commented Mar 6, 2015

@vtolstov I highly recommend reading this page first:
https://consul.io/intro/vs/zookeeper.html

With respect to your questions:

  • Bootstrapping Consul is very simple, and the address of all nodes do not need to be known. The gossip protocol is used to automatically manage that.
  • You cannot use 100 nodes as a server. Technically you can try, but the system will suffer and not perform as you expect. There should be 3 or 5 servers, potentially 7, and the rest are clients.
  • There is no official C API, but you can use libcurl easily enough, as it's just a REST HTTP/JSON API.
  • The /v1/status/leader endpoint can be used to find the leader.
  • Nodes are automatically added/removed using the gossip protocol

If you are trying to do client-side leader elect (e.g. elect a leader in your own application, not Consul), then take a look here:

Hope that helps!

@vtolstov
Copy link
Author

vtolstov commented Mar 6, 2015

You cannot use 100 nodes as a server. Technically you can try, but the system will suffer and not perform as you expect. There should be 3 or 5 servers, potentially 7, and the rest are clients.

In case of etcd i read somewhere.. that etcd use only needed servers (7 or 9) and all other acts as followers and when the one of server that in leader election dies, follower node joins leader election...
Does it possible to do this in consul?

@armon
Copy link
Member

armon commented Mar 6, 2015

@vtolstov Unfortunately Consul does not support hot-standby servers. Nodes must be active servers or clients. This is something we are interested in looking into eventually, but no short term plans.

@rdeusser
Copy link

rdeusser commented Mar 7, 2015

@armon So if you have 3-5 active servers and 100 clients, if one of the active servers kicks the bucket, a client won't step up to take the place of an active server?

@ryanbreen
Copy link
Contributor

That is correct. Consul agents are either servers or clients. There's not
currently a facility for a client to become a server automatically.

On Sat, Mar 7, 2015 at 9:41 AM, Robert Deusser notifications@github.com
wrote:

@armon https://github.com/armon So if you have 3-5 active servers and
100 clients, if one of the active servers kicks the bucket, a client won't
step up to take the place of an active server?


Reply to this email directly or view it on GitHub
#768 (comment).

@rdeusser
Copy link

rdeusser commented Mar 7, 2015

@ryanbreen Is there a branch to add this feature?

@ryanbreen
Copy link
Contributor

I don't believe so. It may be something the team is considering, but to my
knowledge it's not an immediate roadmap item.

On Sat, Mar 7, 2015 at 10:03 AM, Robert Deusser notifications@github.com
wrote:

@ryanbreen https://github.com/ryanbreen Is there a branch to add this
feature?


Reply to this email directly or view it on GitHub
#768 (comment).

@armon
Copy link
Member

armon commented Mar 9, 2015

I think @ryanbreen perfect answered this. There is no plans to support that feature in the short term, so you must dedicate server nodes in advance. I'm going to close this as I think the question is answered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants