Live data from Hacker News

Serf: A decentralized solution for service discovery and orchestration

serfdom.io

21–30 of 48 posts

Re: Serf: A decentralized solution for service discovery and orchestration

#21
The package documentation for the `serf` library[1] looks really exciting. I've been wanting to make a distributed file synchronization tool, and perhaps this would be an excellent library to build it on.

Question: as a relative networking idiot, how does NAT traversal fit into all of this?

[1] - http://godoc.org/github.com/hashicorp/serf/serf

Re: Serf: A decentralized solution for service discovery and orchestration

#22

I'm jumping on a plane right now (a couple hours) but I'd be happy to answer any questions related to Serf once I land. Just leave them here and I'll give it my best shot! We've dreamt of something like Serf for quite awhile and I'm glad it is now a reality. Some recommended URLs if you're curious what the point is: "What is Serf?" http://www.serfdom.io/intro/index.html "Use Cases" http://www.serfdom.io/intro/use-cas…

Since the main goal seems to be node discovery, can you compare why I might want to use this in addition to Salt? I've found salt's node discovery and targeting tools fast and powerful.

We have a comparison against Chef and Puppet, which may be relevant to Salt here: http://www.serfdom.io/intro/vs-chef-puppet.html. Not sure about Salt's search, but Serf is designed to run much more often than config management tools, and is able to handle topology changes in seconds instead of minutes or hours. Serf is also designed ground up to be fault tolerant, which is not usually a design goal of config management tools.

Re: Serf: A decentralized solution for service discovery and orchestration

#23

The package documentation for the `serf` library[1] looks really exciting. I've been wanting to make a distributed file synchronization tool, and perhaps this would be an excellent library to build it on. Question: as a relative networking idiot, how does NAT traversal fit into all of this? [1] - http://godoc.org/github.com/hashicorp/serf/serf

We designed the `serf` library to be able to be easily embedded, so hopefully it can be of some use. Unfortunately Serf does not make use of any sort of NAT traversal currently. We've open sourced the project hoping to get the community involved, and NAT traversal is something we'd gladly work with the community to get implemented.

Re: Serf: A decentralized solution for service discovery and orchestration

#25
This is actually very cool and is something incredibly handy for managing failover/membership.

What I unfortunately don't understand is that there doesn't seem to be a library I can use to take advantage of this in my own application. If I have a program (in Go) am I expected to spin up my own serf process then communicate with it via socket? Is there an option for me to have serf live inside my application?

Re: Serf: A decentralized solution for service discovery and orchestration

#26

This is actually very cool and is something incredibly handy for managing failover/membership. What I unfortunately don't understand is that there doesn't seem to be a library I can use to take advantage of this in my own application. If I have a program (in Go) am I expected to spin up my own serf process then communicate with it via socket? Is there an option for me to have serf live inside my application?

The Serf executable is actually just a wrapper around the `serf` library. That library is designed to be embedded in Go applications. Documentation for the library is available here: http://godoc.org/github.com/hashicorp/serf/serf

Re: Serf: A decentralized solution for service discovery and orchestration

#29
post #19

Earlier quoted context omitted.

The one thing that feels lacking to me, and maybe there's just something I don't get, is the ability to tag nodes with metadata. From the docs it seems like what you're expected to do is fire an event for a node to, eg., declare itself a webserver, but this seems prone to failure in the long run. If I bring a new load balancer online how does it find out what's a webserver already?

This might be a little unclear, but if you check the documentation for agent configuration ( http://www.serfdom.io/docs/agent/options.html ), there is an option to provide a role. The role is the metadata support currently

Cool, I must have missed that. It would be nice, then, if you could also have a node be tagged with multiple roles (as well as add/remove them in a way that propagates).

Re: Serf: A decentralized solution for service discovery and orchestration

#30
post #19

Earlier quoted context omitted.

This might be a little unclear, but if you check the documentation for agent configuration ( http://www.serfdom.io/docs/agent/options.html ), there is an option to provide a role. The role is the metadata support currently

Cool, I must have missed that. It would be nice, then, if you could also have a node be tagged with multiple roles (as well as add/remove them in a way that propagates).

Dynamic roles is a fairly hard problem, which we hope to solve by building a different tool on top of Serf in the near future. If you want multiple roles that are static, it can be simulated by just providing a comma separated value as the role (since that is just an opaque string value to Serf)
Post reply on HN