Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
    Webert de Souza Lima
    I thin Docker uses Serf as well for discovering containers on nodes of a cluster.
    Frederiko Costa
    Hi guys, quick question: Serf is awesome for node membership management. I am interested in membership mgmt based on the health of a process on a member. Consul would be the way to go, IMO, but I wonder if anyone knows an implementation of that.
    Eric Anderson
    I've been playing with the Serf RPC API and when I query for members, the results I get back all make sense ... except that the Addr fields are all in some "raw" binary notation that I can't make sense of. Has anybody here seen anything similar?
    Frost Red Lee
    Hi guys, What is the difference between Serf.Create and Agent.Create? Which one should I use?
    Dan Bent

    Hi serf team,

    Dan from CodeLingo here. Our @CodeLingoBot found some issues in serf and hashicorp/serf#540 to fix them. Is this useful? Would you like @CodeLingoBot to continue on and fix other issues it's found?

    Happy Coding!
    Dan & CodeLingo Team

    Nathan Dataguake Basanese
    Does Serf use the Raft protocol?
    Webert de Souza Lima
    @v6 yes
    I mean, its consensus protocol is based on raft
    Bjørn Borud
    are there any good, minimal examples of using serf as a library?

    I am trying to create APIs using terraform for cloud(azure/aws/google/others) communication. Let me elaborate it bit more with an example.

    I want to create a VM on azure and VM name to be input by user at runtime(like: from POSTMAN) from my API. Once user input the name of VM then it should call terraform behind the scene and create VM.

    I am looking to create above workflow . Kindly suggest.

    I'm seeing a decoder error on the serf agent when trying to send a Query request - [ERR] agent.ipc: Failed to evaluate request: decode fail
    ed: codec.decoder: Unhandled single-byte unsigned integer value: Unrecognized descriptor byte: aa. I'm not sure why. I've described the Query request as below in C#
    public class QueryRequestBody
    public List<string> FilterNodes;
        public Dictionary<string, string> FilterTags;
        public bool RequestAck;
        public ulong Timeout;
        public string Name;
        public byte[] Payload;
    Hello, I'm new here and trying to build Serf for the first time. I'm developing for Windows. After installing Go, MinGW, and the Serf repo, I try "make" and get an error telling me that only OSX is supported Can't setup interfaces on non-Mac. Error!. Is it possible to build for Windows on a Windows box, or will I need a Mac to do this?
    PS - specifically, I'm trying to build an Arm64 version for Windows. Thanks.
    Hows everyone doing
    hi community,
    serf is implemented in GO, right?
    could serf be used in a C++ program, i.e. is there a C++ binding available?
    Steven Tran
    hi, I am interested in using serf for failure detection in a large cluster (>10k nodes). Would serf be able to handle this kind of scale?
    Michael Aldridge
    @stetra yes, Serf has been proven in a very large cluster as part of the Nomad C1M exercise
    Michael Aldridge
    @brmarkus you could do what you want by making a small Go library that exposes the functionality you want and compiling it as a shared object, but I don't know of any go project actually that builds full bindings for another language
    Michael Aldridge
    Are there any docs for using serf effectively to build the backing datastore of an application? My max size for the entire store is 64M, which I think should be well within the gossip limits.
    For serf encryption/decryption using keyring file, Let's have we have Node1 , Node 2, Node 3 with primary key k1. Now Node 3 goes down.....In the meantime,,Node1 did (keygen,install,use) operations..So Node 1, Node 2 are with K2(Primary key),K1(Secondary key)....Now Node 3 comes up..1) will he able to decrypt the messages coming from Node 1/Node 2....2) How do we say serf supports one key can encrypt a message, but many keys can decrypt a message.
    Can I train ML models on serf?
    Diego Bernardes
    I'm trying to do something with Serf embedded in Go but I'm getting confused. It's easy to do the query, but how to respond it? It's not clear for me.
    Diego Bernardes
    Nevermind, just realized that what I'm trying to do need to be done into a higher level.
    Michael Aldridge
    @diegobernardes please do share, this channel is effectively dead
    my question from July is still unanswered
    Diego Bernardes

    @the-maldridge as far as I understood while I was reading the Serf code it's intent is just to establish and keep the state of the cluster. On top of that you need to create you're own communication protocol, on my case each node started a HTTP server and this is how they communicate with each other. If you need coordination, then raft can come in.

    Maybe with Memberlist, that is a dependency from Serf, should be able to send message to other nodes:
    Unfortunately I was not able to make it work.

    Serf is amazing, but it's really lacking examples.

    Michael Aldridge
    yeah, that's my frustration with it
    I want to use serf to bootstrap a raft db under an app I have, but what seems like the default use case is apparently quite complicated
    Matthias Urlichs
    I'm rather unhappy with Serf. I have a three-node cluster and messages I send to the serf daemon on one node sit there for 100+ msec before getting forwarded to the others. reaction on the issue I opened either. hashicorp/serf#581
    Michael Aldridge
    your lack of patience both in issue handling and message delivery suggests that yes, an eventually consistent system probably isn't for you and as you list in your message, MQTT is probably closer to what you're actually looking for.
    Akshay Vijapur
    Hi, Can you please check build on 0.8.4 tag.
    It is failing on 0.8.4
    Abhinay Reddyreddy
    I'd like to use surf to make the nodes in my cluster, aware of each other. I saw the example at which seems to assign a static IP to the load balancer and uses that in all other nodes. What other ways can a node discover another node to be able to join? Is there a best practice or recommended way of doing this?

    Hello people. I am getting to know Serf and understand how it works. I have written a Go code for a client and for an agent. In the agent code, I specify the bind address and port and also the advertise address and port, both bind and advertise points to I start the agent code and see the output "2020/05/05 07:25:35 [INFO] serf: EventMemberJoin: node-a" and I also list the members to see if it was added and it was "[{node-a 6666 map[] alive 1 5 2 2 5 4}]".

    In my client code, I have to specify the RCP address. I know that by default the serf agent runs the RCP service on port 7373 but I cannot find a why of defining the RPC port in my agent code.

    Can someone show me what I am doing wrong?

    Akshay Vijapur
    Thank you @akshayvijapur but I do not understand what you want me to see in your code.
    I am trying to understand why my agent code is not starting the RPC client.
    But when I start the agent via the cli, with serf agent ..., I can run my client code and it connects to the RPC client at
    In your code I see you are making several calls to the RCP client you have running but I can't get mine to start running =)
    Akshay Vijapur
    Can you share error you are getting while starting agent ?
    @akshayvijapur error creating RCP Client: dial tcp connect: connection refused
    @akshayvijapur I have opened this issue: hashicorp/serf#603
    It has more details.
    Tim Orling
    Website download button is 0.8.2. Github says latest release is 0.8.5. But latest tag is 0.9.2
    Clarification as to what is the latest stable release?