TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Consul, a new tool for service discovery and configuration

135 点作者 BummerCloud大约 11 年前

19 条评论

avitzurel大约 11 年前
Those guys are machines.<p>Usually when people release open source software, the documentation is lacking, there&#x27;s no website etc... those guys absolutely nail it every single time.<p>Kudos for them, really!
samstokes大约 11 年前
<i>Registered services and nodes can be queried using both a DNS interface as well as an HTTP interface.</i><p>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 &quot;just works&quot; moments.
评论 #7605861 未加载
评论 #7605549 未加载
stormbrew大约 11 年前
So I&#x27;m mostly curious why this isn&#x27;t just basically serf 2.0. Looking at serf I never really felt like it had much use in the basic form it took, with no ability to advertise extra details about the nodes in a dynamic fashion. Consul seems to build onto serf the things that serf needed to become really useful, so seems more like a successor to serf than a parallel project.<p>It seems like the right thing to do here would be to take the lessons of building consul into making serf something more like a library on which to build other things rather than a service in its own right.
评论 #7607181 未加载
评论 #7607035 未加载
addisonj大约 11 年前
Very impressed.<p>This coalesces a lot of different ideas together into what seems to be a really tight package to solve hard problems. In looking around at what most companies are doing, even startupy types, architectures are becoming more distributed and a (hopefully) solid tool for discovery and configuration seems like a big step in the right direction.
noelwelsh大约 11 年前
Looks like a very cool tool -- could replace Zookeeper with saner admin requirements -- but I&#x27;m more interested in the tech. AP systems (such as Serf, on which Consul is built) have many advantages and I think we&#x27;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 :-)
MechanicalTwerk大约 11 年前
Seriously, who does design for HashiCorp? Their site designs, though similar, always kill it.
评论 #7604994 未加载
hardwaresofton大约 11 年前
This is really awesome, distributed system techniques in the real world. I&#x27;m really jealous of what they&#x27;ve managed to build.<p>I was planning to make a tool like this (smaller scale, one machine), and this will certainly serve as a good guide on how to do it right (or whether I should even bother at all).<p>I can&#x27;t find a trace of a standard&#x2F;included slick web interface for managing the clusters and agents -- are they leaving this up to a 3rd party (by just providing the HTTP API and seeing what people will do with it)? Is that a good idea?
评论 #7605525 未加载
评论 #7605529 未加载
igor47大约 11 年前
i am constantly impressed at the hashicorp guys, who continue to release great tools. they actually released serf on the same day as we released nerve and synapse, which comprise airbnb&#x27;s service registration and discovery platform, smartstack. see <a href="https://github.com/airbnb/nerve" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;airbnb&#x2F;nerve</a> and <a href="https://github.com/airbnb/synapse" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;airbnb&#x2F;synapse</a><p>that said, as i wrote my blog post on service discovery ( <a href="http://nerds.airbnb.com/smartstack-service-discovery-cloud/" rel="nofollow">http:&#x2F;&#x2F;nerds.airbnb.com&#x2F;smartstack-service-discovery-cloud&#x2F;</a> ), dns does not make for the greatest interface to service discovery because many apps and libraries cache DNS looksups.<p>an http interface might be safer, but then you have to build a connector for this into every one of your apps.<p>i still feel that smartstack is a better approach because it is transparent. haproxy also provides us with great introspection for what&#x27;s happening in the infrastructure -- who is talking to whom. we can analyse this both in our logs via logstash and in real-time using datadog&#x27;s haproxy monitoring integration, and it&#x27;s been invaluable.<p>however, this definitely deserves a look if you&#x27;re interested in, for instance, load-balancing UDP traffic
评论 #7608220 未加载
sagichmal大约 11 年前
The underlying Raft implementation is brand new, and looks much improved on the goraft used by etcd. Very impressed.
allengeorge大约 11 年前
This is really impressive - kudos! I&#x27;m jealous - these guys are implementing extremely cool stuff in the distributed systems arena :) (serf - <a href="http://serfdom.io" rel="nofollow">http:&#x2F;&#x2F;serfdom.io</a> - comes to mind)<p>How much time did it take to put this together?
Loic大约 11 年前
Short question: Can I define the IP of the service in the service definition?<p>From the service definition[0] it looks like the IP is always the IP of the node hosting `&#x2F;etc&#x2F;consul.d&#x2F;*` files. I am thinking about it in a scenario where each service (running in a container) is getting an IP address on a private network which is not the IP of the node.<p>[0]: <a href="http://www.consul.io/docs/agent/services.html" rel="nofollow">http:&#x2F;&#x2F;www.consul.io&#x2F;docs&#x2F;agent&#x2F;services.html</a><p>Update: An external service is possible: <a href="http://www.consul.io/docs/guides/external.html" rel="nofollow">http:&#x2F;&#x2F;www.consul.io&#x2F;docs&#x2F;guides&#x2F;external.html</a>
contingencies大约 11 年前
This sounds very impressive, at the risk of breaking the chorus of awesome: <i>what problem does this actually solve?</i><p>Discovery: The consul page alleges that it provides a DNS compatible DNS alternative for peer discovery but is unclear as to what improvements it offers other than &#x27;health checks&#x27;, with the documentation leaving failure resolution processes unspecified (as far as I can see) thus mandating a hyper-simplistic architecture strategy like <i>run lots of redundant instances in case one fails</i>. That&#x27;s not very efficient. (It might be interesting to note that at the ethernet level, IP addresses also provide MAC address discovery. If you are serious about latency, floating IP ownership is generally far faster than other solutions.)<p>Configuration: We already have many configuration management systems, with many problems[1]. This is just a key&#x2F;value store, and as such is not as immediately portable to arbitrary services as existing approaches such as &quot;bunch-of-files&quot;, instead requiring overhead for each service launched in order to make it function with to this configuration model.<p>The use of the newer raft consensus algorithm is interesting, but consensus does not a high availability cluster make. You also need elements like formal inter-service dependency definition in order to have any hope of automatically managing cluster state transitions required to recover from failures in non-trivial topologies. Corosync&#x2F;Pacemaker has this, Consul doesn&#x27;t. Then there&#x27;s the potential split-brain issues resulting from non-redundant communications paths... raft doesn&#x27;t tackle this, as it&#x27;s an algorithm only. Simply put: given five nodes, one of which fails normally, if the remaining four split in equal halves who is the legitimate ruler? Game of thrones.<p>As <i>peterwwillis</i> pointed out, for web-oriented cases, the same degree of architectural flexibility and failure detection proposed under consul can be achieved with significantly reduced complexity using traditional means like a frontend proxy. For other services or people wanting serious HA clustering, I would suggest looking elsewhere for the moment.<p>[1] <a href="http://stani.sh/walter/pfcts" rel="nofollow">http:&#x2F;&#x2F;stani.sh&#x2F;walter&#x2F;pfcts</a>
评论 #7607994 未加载
nemothekid大约 11 年前
I&#x27;m VERY impressed, even more impressed by the fact that it speaks DNS. I do with however that it came with a &quot;driver&quot; option rather running a consul client (or even just SkyDNS-like http option, although I&#x27;m unsure how you would manage membership). That way you could just &quot;include&quot; consul in your python&#x2F;ruby&#x2F;go application, and not have to worry about adding another service to your chef&#x2F;pupper config and running yet another service.
justinfranks大约 11 年前
Consul really solves a large problem for most SaaS companies who run or plan to run a Hybrid Cloud, Multi-cloud, or Multi-data center environment
opendais大约 11 年前
This is slightly off topic but I&#x27;m curious why none of the service discovery tools run off of something like Cassanandra as the datastore?
评论 #7605413 未加载
dantiberian大约 11 年前
How does this differ from <a href="http://www.serfdom.io/" rel="nofollow">http:&#x2F;&#x2F;www.serfdom.io&#x2F;</a>, another HashiCorp product?
评论 #7604986 未加载
评论 #7605651 未加载
Axsuul大约 11 年前
Can anyone care to provide some real world examples? I&#x27;m having a hard time wrapping my head around what this exactly does.
评论 #7605372 未加载
djb_hackernews大约 11 年前
Should something be happening with the bar data payload in the HTTP kv example? Or is the value encoded for some reason?
评论 #7605540 未加载
评论 #7605187 未加载
评论 #7605184 未加载
peterwwillis大约 11 年前
I&#x27;ll preface these comments by saying that Consul appears to be the first distributed cluster management tool i&#x27;ve seen in years that gets pretty much everything right (I can&#x27;t tell exactly what their consistency guarantees are; I suppose it depends on the use case?).<p>What I will say, in my usually derisive fashion, is I can&#x27;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&#x27;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&#x27;t really work without your application being designed for it, or an intermediary&#x2F;backend application designed for it).<p>Load balancing an increase of requests by incrementally adding resources is what most people want when they say they want to scale. You don&#x27;t need decentralized services to provide this. What do decentralized services provide, then? &quot;Resilience&quot;. 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&#x27;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&#x27;s misses&#x2F;hits.<p>All the features that tools like this provide - a replicated key&#x2F;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&#x27;s website on it demanding to implement this new technology, try to see if you <i>need it</i>, or if you just think it&#x27;s really cool.<p>It&#x27;s also kind of scary that the ability of an entire network like Consul&#x27;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&#x2F;states?
评论 #7605874 未加载