I am trying to create a cluster of hooks that send messages and listen
to each other's messages - without having a single point-of-failure.
It appears that autoheal is what I want - but I havent been able to
work out from docs, examples, mailing lists, blog posts, etc how this
is done across hosts.
I have seen references to mdns and "-m" but havent figured out how to
do this in code.
I have seen references to using Hook.listen() and Hook.connect() - but
its unclear to me how a restarting node would know where to connect()
if the server had failed (and another node had now become the server)
With a bit of trial and error, I have a simple case working of a mesh
of autoheal-ing hooks that works on the same host.
============================
var Hook = require('
hook.io').Hook;
var hooky = new Hook({
name: "hooky",
silent: false,
autoheal: true
});
hooky.start();
============================
I can start a number of them on the same host, and everything works as
I expect.
Is there an example of what I need to change above do do this across
hosts?