Live data from Hacker News

Consul, a new tool for service discovery and configuration

hashicorp.com

31–40 of 62 posts

Re: Consul, a new tool for service discovery and configuration

#31
I'll preface these comments by saying that Consul appears to be the first distributed cluster management tool i've seen in years that gets pretty much everything right (I can't tell exactly what their consistency guarantees are; I suppose it depends on the use case?).

What I will say, in my usually derisive fashion, is I can't tell why the majority of businesses would need decentralized network services like this. If you own your network, and you own all the resources in your network, and you control how they operate, I can't think of a good reason you would need services like this, other than a generalized want for dynamic scaling of a service provider (which doesn't really work without your application being designed for it, or an intermediary/backend application designed for it).

Load balancing an increase of requests by incrementally adding resources is what most people want when they say they want to scale. You don't need decentralized services to provide this. What do decentralized services provide, then? "Resilience". In the face of a random failure of a node or service, another one can take its place. Which is also accomplished with either network or application central load balancing. What you don't get [inherently] from decentralized services is load balancing; sending new requests to some poor additional peer simply swamps it. To distribute the load amongst all the available nodes, now you need a DHT or similar, and take a slight penalty from the efficiency of the algorithm's misses/hits.

All the features that tools like this provide - a replicated key/value store, health checks, auto discovery, network event triggers, service discovery, etc - can all be found in tools that work based on centralized services, while remaining scalable. I guess my point is, before you run off to your boss waving an iPad with Consul's website on it demanding to implement this new technology, try to see if you need it, or if you just think it's really cool.

It's also kind of scary that the ability of an entire network like Consul's to function depends on minimum numbers of nodes, quorums, leaders, etc. If you believe the claims that the distributed network is inherently more robust than a centralized one, you might not build it with fault-tolerant hardware or monitor them adequately, resulting in a wild goose chase where you try to determine if your app failures are due to the app server, the network, or one piece of hardware that the network is randomly hopping between. Could a bad switch port cause a leader to provide false consensus in the network? Could the writes on one node basically never propagate to its peers due to similar issues? How could you tell where the failure was if no health checks show red flags? And is there logging of the inconsistent data/states?

Re: Consul, a new tool for service discovery and configuration

#32
post #5

How does this differ from http://www.serfdom.io/ , another HashiCorp product?

http://www.consul.io/intro/vs/serf.html

"Serf is a service discovery and orchestration tool..."

"... However, Serf does not provide any high-level features such as service discovery..."

Hm...

Re: Consul, a new tool for service discovery and configuration

#33

Registered services and nodes can be queried using both a DNS interface as well as an HTTP interface. This is very cool. Integrating with a name resolution protocol that every existing programmer and stack knows how to use (often without even thinking about it) should lead to some magical "just works" moments.

See also SkyDNS, another service discovery system: http://blog.gopheracademy.com/skydns

In common with Consul:

* DNS interface

* Operates as a distributed cluster

* Uses Raft for consensus

Re: Consul, a new tool for service discovery and configuration

#34

I'll preface these comments by saying that Consul appears to be the first distributed cluster management tool i've seen in years that gets pretty much everything right (I can't tell exactly what their consistency guarantees are; I suppose it depends on the use case?). What I will say, in my usually derisive fashion, is I can't tell why the majority of businesses would need decentralized network services like this. If…

Thanks for prefacing the constructive criticism with the compliment. :)

I want to clarify: Of all the buzz words Consul has, one thing Consul ISN'T is decentralized. You must run at least one Consul server in a cluster. If you want a fully centralized approach, you can just run one server. No big deal. Of course, if that server goes down, reads/writes are unavailable. If you want high availability, you run multiple servers. They leader elect to determine who will handle the writes but that is about it.

It is "decentralized" in that you can send read/writes to any server, but those servers actually just forward the requests onto the leader.

Re: Consul, a new tool for service discovery and configuration

#35
Looks like a very cool tool -- could replace Zookeeper with saner admin requirements -- but I'm more interested in the tech. AP systems (such as Serf, on which Consul is built) have many advantages and I think we're only just beginning to see their adoption. I believe CRDTs are the missing ingredient to restore sanity to inconsistent data. Add that and I can see a lot more such systems being deployed in the future (and particularly in mine :-)

Re: Consul, a new tool for service discovery and configuration

#36

Earlier quoted context omitted.

tldr; centralize, and you have single point of failure, that's bad for distributed systems. you can have multiple DBs, but how will your app know about them, if they're brought up dynamically? You'll have to stop instances, possibly modify some code/env/something, and keep those changes in your head. Well so the problem is, as soon as you centralize, you introduce a single point of failure, which is a no-no if you're…

I wasn't trying to start a complex argument in someone else's thread. Sorry. Maybe we should drop it and/or discuss elsewhere? I think you misunderstood what I was talking about based on your explanation with a single physical machine running a single database instance and manually adding nodes requiring human intervention.

Ah OK, was feeling I was explaining far too much -- no worries, but if HN is no longer a place for complex arguments, I think it'd be a lot less valuable... Also, me being wrong certainly sounds like a great chance for Hashicorp people to correct me.

Re: Consul, a new tool for service discovery and configuration

#37

I'll preface these comments by saying that Consul appears to be the first distributed cluster management tool i've seen in years that gets pretty much everything right (I can't tell exactly what their consistency guarantees are; I suppose it depends on the use case?). What I will say, in my usually derisive fashion, is I can't tell why the majority of businesses would need decentralized network services like this. If…

Thanks for prefacing the constructive criticism with the compliment. :) I want to clarify: Of all the buzz words Consul has, one thing Consul ISN'T is decentralized. You must run at least one Consul server in a cluster. If you want a fully centralized approach, you can just run one server. No big deal. Of course, if that server goes down, reads/writes are unavailable. If you want high availability, you run multiple s…

Oh, well i'm a giant ass then. I saw "completely distributed" and extrapolated decentralized from that. Still, an automatically-[randomly?]-elected leader in a distributed network is a form of decentralized network. It's effectively a toroidal network topology, since your datacenters make it multi-dimensional (though now that I look at hypercubes i'm not exactly sure which is a better fit here)

Now that i've re-read your architecture page, let me see if I understand this: the basic point behind using Consul is to have multiple servers agree on the result of a request, and communicate that agreement to a single node to write it, and then return it to the client. So really it's a fault-tolerant messaging platform that includes features that take advantage of such a network; do I have that right?

Also, your docs say there are between three and five servers, but here you're saying you only need one?

Re: Consul, a new tool for service discovery and configuration

#38
post #5

Earlier quoted context omitted.

http://www.consul.io/intro/vs/serf.html

"Serf is a service discovery and orchestration tool..." "... However, Serf does not provide any high-level features such as service discovery..." Hm...

That can probably be worded better. Serf operates at a node level abstraction, while Consul operates at a service level. In fact, Serf is used in Consul to power the discovery of other nodes.

Re: Consul, a new tool for service discovery and configuration

#39

Registered services and nodes can be queried using both a DNS interface as well as an HTTP interface. This is very cool. Integrating with a name resolution protocol that every existing programmer and stack knows how to use (often without even thinking about it) should lead to some magical "just works" moments.

See also SkyDNS, another service discovery system: http://blog.gopheracademy.com/skydns In common with Consul: * DNS interface * Operates as a distributed cluster * Uses Raft for consensus

[deleted]

Re: Consul, a new tool for service discovery and configuration

#40

Registered services and nodes can be queried using both a DNS interface as well as an HTTP interface. This is very cool. Integrating with a name resolution protocol that every existing programmer and stack knows how to use (often without even thinking about it) should lead to some magical "just works" moments.

See also SkyDNS, another service discovery system: http://blog.gopheracademy.com/skydns In common with Consul: * DNS interface * Operates as a distributed cluster * Uses Raft for consensus

SkyDNS is compared to Consul here: http://www.consul.io/intro/vs/skydns.html
Post reply on HN