Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
    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: https://godoc.org/github.com/hashicorp/memberlist#Memberlist.SendReliable
    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 https://github.com/hashicorp/serf/tree/master/demo/web-load-balancer 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?
    trying to advertise inside a docker container, doesn't seem to work..
    Matthias Urlichs
    Docker vs. multicast is notoriously finicky to configure correctly. I'd advise to not depend on it, and drop either docker or advertising.
    Hello everyone
    Chu Duc Minh
    I have an use-case to run serf in public environment. How I can force a malicious node to leave and change auth-key at the same time, so the malicious node can't join back?
    Michael Aldridge
    I'm not sure there's a good way to do that .
    Hello All, I am just getting started with raft and serf. I understand that raft is a consensus algorithm and clients can communicate with the cluster only via the leader. assume a follower received a change from elsewhere, how can it propagate to the leader so it can send it to the rest of the cluster.
    Hello. I read in the documenation that it is possible to query the nodes (snythetic) coordinates (https://www.serf.io/docs/agent/rpc.html#get-coordinate). How exactly can I achieve this via serf cli? serf query get-coordinates does not recognize get-coordinates as an internal command. To I need to write a event handler that retrieves the coordinates myself, or is there already a build-in solution for that? Thanks!
    Michael Aldridge
    @oliverhalu this chat is pretty dead, you might have better luck with the forum over at https://discuss.hashicorp.com/