Mailing List Archive

pl-cluster
Hello All,
I am not on this list, nor do I follow it, so please bear with me. I
would appreciate it if any replies were CC'd to my email address.

I was not happy with certain things about the heartbeat code provided
through the Linux-HA site, so I wrote my own heartbeat code. Things at
work have forced me to drop the project for the time being, but rather
than let my work go to waste I thought some of it may be salvaged for
other projects. The code can be downloaded at
http://www.dataclarity.com/ (please note .com, not .net).

There are some things my code does better than heartbeat, and some
(most?) things that heartbeat does much better. I chose to use
multicasting -- not as reliable, but allows (theoretically) unlimited
number of nodes. I also wrote everything in C/C++ since I tend not to
like the mess made by calling billions of shell scripts. My code can
run multiple "clusters" in one server process by using threads.
Another nice feature is the ability to run my code in 'listen only'
mode, so cluster activity can be monitored.

Some things to note:
Multicasting must be compiled into the kernel.
Requires pthreads and glib libraries.
There is little/no documentation, read the code.
Code quality is alpha at best, YMMV.

Feel free to rip out useful pieces, the only thing I ask for is a
little credit.

--
======================================================================
Andrew Barnett PO Box 701
Data Clarity, Inc. Abington, PA 19001
andrew@dataclarity.net tel (877)496-3527
http://www.dataclarity.net/ fax (801)382-1525
======================================================================
Re: pl-cluster [ In reply to ]
Andrew Barnett wrote:
>
> Hello All,
> I am not on this list, nor do I follow it, so please bear with me. I
> would appreciate it if any replies were CC'd to my email address.
>
> I was not happy with certain things about the heartbeat code provided
> through the Linux-HA site, so I wrote my own heartbeat code. Things at
> work have forced me to drop the project for the time being, but rather
> than let my work go to waste I thought some of it may be salvaged for
> other projects. The code can be downloaded at
> http://www.dataclarity.com/ (please note .com, not .net).
>
> There are some things my code does better than heartbeat, and some
> (most?) things that heartbeat does much better. I chose to use
> multicasting -- not as reliable, but allows (theoretically) unlimited
> number of nodes. I also wrote everything in C/C++ since I tend not to
> like the mess made by calling billions of shell scripts. My code can
> run multiple "clusters" in one server process by using threads.

Does that mean that one machine can join multiple clusters simultaneously?

> Another nice feature is the ability to run my code in 'listen only'
> mode, so cluster activity can be monitored

This seems like a nice combination together with multicast.

> Some things to note:
> Multicasting must be compiled into the kernel.
> Requires pthreads and glib libraries.
> There is little/no documentation, read the code.
> Code quality is alpha at best, YMMV.
>
> Feel free to rip out useful pieces, the only thing I ask for is a
> little credit.

Thanks for the offer! What's license are you using?

What was the last version of heartbeat you looked at?

Did you implement strong authentication similar to the current code?

It'll be good to look over your code. Certainly, we want to do multicast, so
that code will be especaily interesting to look at. As far as reliability is
concerned, heartbeat would be just as reliable over multicast as it is over
broadcast, because of the error correction in the protocol. From the sounds of
it, I suspect that you looked at the code before the authentication and error
correction were added.

Also, the current code has fewer scripts than the version I suspect you looked
at, though I probably not few enough for your taste.

I added a pointer to your code to the linux-ha web site.

Thanks!

-- Alan Robertson
alanr@bell-labs.com
Re: pl-cluster [ In reply to ]
(message edited for brevity)

Alan Robertson wrote:
> Andrew Barnett wrote:

> > There are some things my code does better than heartbeat, and some
> > (most?) things that heartbeat does much better. I chose to use
> > multicasting -- not as reliable, but allows (theoretically) unlimited
> > number of nodes. I also wrote everything in C/C++ since I tend not to
> > like the mess made by calling billions of shell scripts. My code can
> > run multiple "clusters" in one server process by using threads.
>
> Does that mean that one machine can join multiple clusters simultaneously?

Yes, machines may join multiple clusters. Cluster communications can
be segmented in four ways: by multicast address, by port, by cluster
name, and by cluster secret. All of these 'channels' must match for
two nodes to communicate with each other. That also means you can have
many, many clusters communicating over the same hardware -- simply
change one 'channel' to segment the nodes.

> Thanks for the offer! What's license are you using?

GPL v2

> What was the last version of heartbeat you looked at?

heartbeat-0.4.5a (I realize there's a new version...my cluster stuff
has been sitting around for a while).

> Did you implement strong authentication similar to the current code?

Every node in the cluster must know the cluster secret, otherwise the
node's packets are ignored. I haven't looked at the current code to
know what is done.

> I added a pointer to your code to the linux-ha web site.

I appreciate that, thank you.

--
======================================================================
Andrew Barnett PO Box 701
Data Clarity, Inc. Abington, PA 19001
andrew@dataclarity.net tel (877)496-3527
http://www.dataclarity.net/ fax (801)382-1525
======================================================================