{"_id":"ha","_rev":"32-c88c08d5697fe4358df4f1c2d8826c79","name":"ha","description":"High Availability at the network interface level","dist-tags":{"latest":"0.0.17"},"versions":{"0.0.3":{"author":{"name":"Chris Dew","email":"cmsdew@gmail.com"},"name":"ha","description":"High Availability at the network interface level","version":"0.0.3","homepage":"https://github.com/chrisdew/ha","repository":{"type":"git","url":"git://github.com/chrisdew/ha.git"},"main":"ha.js","dependencies":{},"devDependencies":{},"optionalDependencies":{},"engines":{"node":"0.6.x"},"bin":{"ha":"./ha.js"},"_npmUser":{"name":"chrisdew","email":"cmsdew@gmail.com"},"_id":"ha@0.0.3","_engineSupported":true,"_npmVersion":"1.1.21","_nodeVersion":"v0.6.17","_defaultsLoaded":true,"dist":{"shasum":"0b7221bb936a01ed2493b9bd21835009248f2e57","tarball":"https://registry.npmjs.org/ha/-/ha-0.0.3.tgz","integrity":"sha512-oR/bu7qeAhJLc+iI9NXNvaBOnixtoap3OYvMtfnVSD9LLEYRFU5Y/IFxLAyiIQYsdX5XHF79wQx1hY2S3hzSnQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEw7aJPCyb8a2UQsHrPbUx1voxZYd1YeaIu3LgSU5zTnAiEAvBAe86LUZMYt9sREIZJHsWOY28UZln4X1Q/RV1wFUrU="}]},"maintainers":[{"name":"chrisdew","email":"cmsdew@gmail.com"}]},"0.0.4":{"author":{"name":"Chris Dew","email":"cmsdew@gmail.com"},"name":"ha","description":"High Availability at the network interface level","version":"0.0.4","homepage":"https://github.com/chrisdew/ha","repository":{"type":"git","url":"git://github.com/chrisdew/ha.git"},"main":"ha.js","dependencies":{},"devDependencies":{},"optionalDependencies":{},"engines":{"node":"0.6.x"},"bin":{"ha":"./ha.js"},"_npmUser":{"name":"chrisdew","email":"cmsdew@gmail.com"},"_id":"ha@0.0.4","_engineSupported":true,"_npmVersion":"1.1.21","_nodeVersion":"v0.6.17","_defaultsLoaded":true,"dist":{"shasum":"c8dd7a57014b59db25dbe734552ff17b63ca3339","tarball":"https://registry.npmjs.org/ha/-/ha-0.0.4.tgz","integrity":"sha512-JvQYR2ZUIeEuHPs3ZF0SEH1CECCfgbmvoAmFFwcItz9vxve0Ns9/LHW06hvCpOGgod+mQRNvOW2bkAd0CQpymA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGp1NgL3evikmfzwV55q4jHAfNMHgA9MtBdIOHiIQ4M9AiAZbbK2o6n/TfF2kjnRRWFTE/S0quWJI0ZEOhwdTBNm7A=="}]},"maintainers":[{"name":"chrisdew","email":"cmsdew@gmail.com"}]},"0.0.5":{"author":{"name":"Chris Dew","email":"cmsdew@gmail.com"},"name":"ha","description":"High Availability at the network interface level","version":"0.0.5","homepage":"https://github.com/chrisdew/ha","repository":{"type":"git","url":"git://github.com/chrisdew/ha.git"},"main":"ha.js","dependencies":{},"devDependencies":{},"optionalDependencies":{},"engines":{"node":"0.6.x"},"bin":{"ha":"./ha.js"},"_npmUser":{"name":"chrisdew","email":"cmsdew@gmail.com"},"_id":"ha@0.0.5","_engineSupported":true,"_npmVersion":"1.1.21","_nodeVersion":"v0.6.17","_defaultsLoaded":true,"dist":{"shasum":"8314cb9912247ac9048a538ec589dbecec721c11","tarball":"https://registry.npmjs.org/ha/-/ha-0.0.5.tgz","integrity":"sha512-6HUjkl25VxStepro8G0oY4bN6bUK8k9QWhGOz0B3RNmISOED8kNovKxiAnGw2mTze0iCGcXGlAZbzbAl8WLcHA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICGRCrwZh7mQdPATvWP/30TMzC4wFENMT7VJmS4PbU/mAiBAbNdFZRscNBkh5PcxkujY8+omPbQMIdwEmxkwL0vYlg=="}]},"maintainers":[{"name":"chrisdew","email":"cmsdew@gmail.com"}]},"0.0.6":{"author":{"name":"Chris Dew","email":"cmsdew@gmail.com"},"name":"ha","description":"High Availability at the network interface level","version":"0.0.6","homepage":"https://github.com/chrisdew/ha","repository":{"type":"git","url":"git://github.com/chrisdew/ha.git"},"main":"ha.js","dependencies":{},"devDependencies":{},"optionalDependencies":{},"engines":{"node":"0.6.x"},"bin":{"ha":"./ha.js"},"_npmUser":{"name":"chrisdew","email":"cmsdew@gmail.com"},"_id":"ha@0.0.6","_engineSupported":true,"_npmVersion":"1.1.21","_nodeVersion":"v0.6.17","_defaultsLoaded":true,"dist":{"shasum":"94ca48df69626daa6a2df5b58ba993ddc248b3d5","tarball":"https://registry.npmjs.org/ha/-/ha-0.0.6.tgz","integrity":"sha512-qLE50hD0YO1octwAu4y/d0Iz1c4dLSlIG3p+nueXhGnNBzls59X4qO8CsesP5K1OTteU+3jP5uyLO5ufXTtk3g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAEHEEezqrM2MTJOluozc2WCyA9fWGjK2kPflv8RAd5JAiB0a8v5kP5ZxETG+OIXlRejn1wn81ixSDfFiQf+SosOdA=="}]},"maintainers":[{"name":"chrisdew","email":"cmsdew@gmail.com"}]},"0.0.7":{"author":{"name":"Chris Dew","email":"cmsdew@gmail.com"},"name":"ha","description":"High Availability at the network interface level","version":"0.0.7","homepage":"https://github.com/chrisdew/ha","repository":{"type":"git","url":"git://github.com/chrisdew/ha.git"},"main":"ha.js","dependencies":{},"devDependencies":{},"optionalDependencies":{},"engines":{"node":"0.6.x"},"bin":{"ha":"./ha.js"},"_npmUser":{"name":"chrisdew","email":"cmsdew@gmail.com"},"_id":"ha@0.0.7","_engineSupported":true,"_npmVersion":"1.1.21","_nodeVersion":"v0.6.17","_defaultsLoaded":true,"dist":{"shasum":"c858573b526b6931aeb1a4ac155f7fc993b43ac8","tarball":"https://registry.npmjs.org/ha/-/ha-0.0.7.tgz","integrity":"sha512-d7zS51mCkEJAqyqmbb2T+qaF0lEiB6Htx0vQmjUTLccpWgVHWqoXysolnHUA97D0ok9xcAQWRRaOUofzltZaWg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD8QtuOZS+ZzVhRiYrEIz/h3j1gAOPCgcbGdwqNtjjQXwIgc2BCsUKV7XmZhpzTFq/f78185gG50xMEkei007U3mKs="}]},"maintainers":[{"name":"chrisdew","email":"cmsdew@gmail.com"}]},"0.0.9":{"author":{"name":"Chris Dew","email":"cmsdew@gmail.com"},"name":"ha","description":"High Availability at the network interface level","version":"0.0.9","homepage":"https://github.com/chrisdew/ha","repository":{"type":"git","url":"git://github.com/chrisdew/ha.git"},"main":"ha.js","dependencies":{},"devDependencies":{},"optionalDependencies":{},"scripts":{"start":"node ha.js","test":"mocha"},"engines":{"node":"~0.10.0"},"bugs":{"url":"https://github.com/chrisdew/ha/issues"},"_id":"ha@0.0.9","dist":{"shasum":"58110181c0197afc2de553d4f2723053b3212759","tarball":"https://registry.npmjs.org/ha/-/ha-0.0.9.tgz","integrity":"sha512-zNMMSX/UlP71MaZoYw03MZr2XN8yFBhU/ZP/YvnBYfUHNzXaRZsB78+VE7pMP+jgKu3I3d+u2wCkPMn7eoAbMg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBV85kwPMkJdXLZgvP5T9dKjtr8mVHUQo+I/o/irBSsIAiBr+8e7ljTLv8KjEDZrmUZNV24/IiIs+FaURtKVzrKSMw=="}]},"_from":".","_npmVersion":"1.3.24","_npmUser":{"name":"chrisdew","email":"cmsdew@gmail.com"},"maintainers":[{"name":"chrisdew","email":"cmsdew@gmail.com"}]},"0.0.13":{"author":{"name":"Chris Dew","email":"cmsdew@gmail.com"},"name":"ha","description":"High Availability at the network interface level","version":"0.0.13","homepage":"https://github.com/chrisdew/ha","repository":{"type":"git","url":"git://github.com/chrisdew/ha.git"},"main":"ha.js","dependencies":{},"devDependencies":{},"optionalDependencies":{},"scripts":{"start":"node ha.js","test":"mocha"},"engines":{"node":"~0.10.0"},"gitHead":"b45ec72767020c18ef2484fcde0bdea2e93bcbd9","bugs":{"url":"https://github.com/chrisdew/ha/issues"},"_id":"ha@0.0.13","_shasum":"df78174cf957751269f55435950968977a36738c","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"chrisdew","email":"cmsdew@gmail.com"},"maintainers":[{"name":"chrisdew","email":"cmsdew@gmail.com"}],"dist":{"shasum":"df78174cf957751269f55435950968977a36738c","tarball":"https://registry.npmjs.org/ha/-/ha-0.0.13.tgz","integrity":"sha512-zKyF+0WpvjIw5G1UK/yB29VFV3fyeABXmaGEJw0iow+GKwdqUvo5NbvMBE9M5KdIoDJHQUFLj8z0y/87VnHNYA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCk5hZlmtjWi5X/TkWO9VhSyJfLUKuqajT0usb7S+q8aQIhANV6A95rZ2SwMpan9eLf7HLDbjSWREhOF0lsMACcjhsH"}]}},"0.0.14":{"author":{"name":"Chris Dew","email":"cmsdew@gmail.com"},"name":"ha","description":"High Availability at the network interface level","version":"0.0.14","homepage":"https://github.com/chrisdew/ha","repository":{"type":"git","url":"git://github.com/chrisdew/ha.git"},"main":"ha.js","dependencies":{},"devDependencies":{},"optionalDependencies":{},"scripts":{"start":"node ha.js","test":"mocha"},"engines":{"node":"~0.10.0"},"gitHead":"2697698e8fd845d9df245c216b5604478486b5e7","bugs":{"url":"https://github.com/chrisdew/ha/issues"},"_id":"ha@0.0.14","_shasum":"1448e9e0eb77649c477431f70c29c78f72bb5251","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"chrisdew","email":"cmsdew@gmail.com"},"maintainers":[{"name":"chrisdew","email":"cmsdew@gmail.com"}],"dist":{"shasum":"1448e9e0eb77649c477431f70c29c78f72bb5251","tarball":"https://registry.npmjs.org/ha/-/ha-0.0.14.tgz","integrity":"sha512-1po7lDWWepxr0QqT55aOwrk3YrZJX/h14ITamMYa19tYLEKH/goGZ5MPCWMxZT6lkU8XUFcbirBeVo5a+8Ey7A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE/G6+UffQFLOJlWOJAz2AETSXeAo5oDAj9SIAJrhFkhAiEAmc7W45SkpcsmY5AVj8X0lAWrdflKuaaRNZ8Wd8XO2XM="}]}},"0.0.15":{"author":{"name":"Chris Dew","email":"cmsdew@gmail.com"},"name":"ha","description":"High Availability at the network interface level","version":"0.0.15","homepage":"https://github.com/chrisdew/ha","repository":{"type":"git","url":"git://github.com/chrisdew/ha.git"},"main":"ha.js","dependencies":{},"devDependencies":{},"optionalDependencies":{},"scripts":{"start":"node ha.js","test":"mocha"},"engines":{"node":"~0.10.0"},"gitHead":"2697698e8fd845d9df245c216b5604478486b5e7","bugs":{"url":"https://github.com/chrisdew/ha/issues"},"_id":"ha@0.0.15","_shasum":"11ac547c0abfe0fe86223bc0deb71d658887af15","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"chrisdew","email":"cmsdew@gmail.com"},"maintainers":[{"name":"chrisdew","email":"cmsdew@gmail.com"}],"dist":{"shasum":"11ac547c0abfe0fe86223bc0deb71d658887af15","tarball":"https://registry.npmjs.org/ha/-/ha-0.0.15.tgz","integrity":"sha512-QvU3JmBDKjvEnBSi/RfsNwzDZU0b07oGOuyDsqiHzSvlKQvYoK9kYPjr8VjMHazdA3j7B6jE8p02iG2q5CLECw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE4jXdoCKiTg+QtINn9+0gB97qC8Uv8MeWdp14VdbFRyAiEA7OF3P6GHcSqjW1de4c65s0q7jKFy2IAUN8uyniNCLoE="}]}},"0.0.16":{"author":{"name":"Chris Dew","email":"cmsdew@gmail.com"},"name":"ha","description":"High Availability at the network interface level","version":"0.0.16","homepage":"https://github.com/chrisdew/ha","repository":{"type":"git","url":"git://github.com/chrisdew/ha.git"},"main":"ha.js","dependencies":{},"devDependencies":{},"optionalDependencies":{},"scripts":{"start":"node ha.js","test":"mocha"},"engines":{"node":"~0.10.0"},"gitHead":"2697698e8fd845d9df245c216b5604478486b5e7","bugs":{"url":"https://github.com/chrisdew/ha/issues"},"_id":"ha@0.0.16","_shasum":"9c15e16057fe807bd1dfc9cde045b9c93b7d38d3","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"chrisdew","email":"cmsdew@gmail.com"},"maintainers":[{"name":"chrisdew","email":"cmsdew@gmail.com"}],"dist":{"shasum":"9c15e16057fe807bd1dfc9cde045b9c93b7d38d3","tarball":"https://registry.npmjs.org/ha/-/ha-0.0.16.tgz","integrity":"sha512-MIPH0Ap2s1OLquvf2IjUQ19PHs1srGP3BcWMvRmVnd+MGv3LdfYQrSdmZVF8NHfgxmfgkHOo70HizhbFX+nRiw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICm/X76gYub3FKbGTHB16mlcMh3WuBPvmJx4pwkIbYkSAiB8PSHeB1NxDax2VnhNZ+qSv0fVSWJjP0Iv1DuTvQlQkg=="}]}},"0.0.17":{"author":{"name":"Chris Dew","email":"cmsdew@gmail.com"},"name":"ha","description":"High Availability at the network interface level","version":"0.0.17","homepage":"https://github.com/chrisdew/ha","repository":{"type":"git","url":"git://github.com/chrisdew/ha.git"},"main":"ha.js","dependencies":{},"devDependencies":{},"optionalDependencies":{},"scripts":{"start":"node ha.js","test":"mocha"},"engines":{"node":"~0.10.0"},"gitHead":"52b647c43bfe74987822816f6f04a8891af8d7d5","bugs":{"url":"https://github.com/chrisdew/ha/issues"},"_id":"ha@0.0.17","_shasum":"51682db55a06532539e1638ae8dda5771f5a86a1","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"chrisdew","email":"cmsdew@gmail.com"},"maintainers":[{"name":"chrisdew","email":"cmsdew@gmail.com"}],"dist":{"shasum":"51682db55a06532539e1638ae8dda5771f5a86a1","tarball":"https://registry.npmjs.org/ha/-/ha-0.0.17.tgz","integrity":"sha512-AH+nKNS1xGIZwVE4kuPpmOeh7zXZYQMm6jixPAQN9qiEVrWvb5CddmZvY8jQghIt3MwGn3ueUp3jOwxj6Sq2Qg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF+WGT1a4OCfou3yrFnZUOXKZFQDzhiSgpa31gGMqr/BAiEA7xkbK6GY/c1a6GN90YXc+O+hKz4mfCjDBhX6ZyTi95Q="}]}}},"readme":"ha - High Availability using NodeJS\n-----------------------------------\n\n'ha' is a very limited high-availability application focused on one use-case:\n\nTwo or more Linux servers on one LAN, providing services on one shared (or virtual) IP address.\n\nUpdated for NodeJS v0.10.X.\n\n\nHow it Works\n------------\n\nEach server is configured with a real ethernet address (e.g. eth0 192.168.1.20) and \nthe shared address (e.g. eth0:1 192.168.1.100).  (I've used a virtual ethernet \ndevice, but this could easily be a real device on a multi-homed server.  There is \nno requirement that the shared address is in the same subnet as the unique \naddresses.)\n\nAll the servers have unique real addresses (.20, .21, etc.), but all use the same \nvirtual address (.100).  The inteface with the virtual address *must* be configured\nas 'down' at boot time.\n\nAll of the servers multicast a packet each second.  Each server receives these \npackets and if it hears one from a 'more worthy' server, and is ACTIVE, it becomes \nSTANDBY.\n\nIf a server doesn't hear from a more 'worthy' server in 3.5 seconds, it becomes \nACTIVE.\n\nAll servers start in the STANDBY state.\n\nWhen a server goes from STANDBY to ACTIVE it brings up the interface with the shared\naddress and uses gratuitous arp to tell the LAN about it as quickly as possible.\n\n\nShortcomings\n------------\n\nWhen a more 'worthy' node starts multicasting, the less worthy node which is \ncurrently hosting the shared address brings it down immediately.  The more worthy\nnode takes 3.5 seconds before it comes up.  This could be fixed with a more complex \nprotocol and state machines.\n\nThis can be partially alleviated in by shortening the multicast interval and \ntolerance.\n\nThis HA solution is not bi- or multi-stable.  The most 'worthy' node will host the\nshared address at all times.\n\n\nExample /etc/network/interfaces file (Debian/Ubuntu)\n----------------------------------------------------\n\n```\n# This file describes the network interfaces available on your system\n# and how to activate them. For more information, see interfaces(5).\n\n# The loopback network interface\nauto lo\niface lo inet loopback\n\n# The primary network interface\nauto eth0\niface eth0 inet static\n    address 192.168.1.20\n    netmask 255.255.255.0\n    gateway 192.168.1.254\n\n# The shared cluster address\niface eth0:1 inet static\n    address 192.168.1.100\n    netmask 255.255.255.0\n    up arping -A -I eth0 192.168.1.100 -w 1\n    up arping -U -I eth0 192.168.1.100 -w 1\n```\n\n\nWhy NodeJS, not the mature Linux HA?\n------------------------------------\n\nBecause Linux HA was NIH ;)\n\nUsing NodeJS makes is extremely easy for us to add HA to our existing NodeJS \nservices and lets us customise HA policy very easily.\n\n\n","maintainers":[{"name":"chrisdew","email":"cmsdew@gmail.com"}],"time":{"modified":"2022-06-18T18:36:24.077Z","created":"2012-05-15T09:34:42.455Z","0.0.3":"2012-05-15T09:34:43.715Z","0.0.4":"2012-05-15T12:32:54.003Z","0.0.5":"2012-05-15T12:36:34.255Z","0.0.6":"2012-05-15T12:40:12.407Z","0.0.7":"2012-05-15T13:16:59.487Z","0.0.9":"2014-03-12T14:59:25.711Z","0.0.13":"2014-07-29T14:43:30.480Z","0.0.14":"2014-11-14T10:33:03.264Z","0.0.15":"2014-11-14T10:41:30.070Z","0.0.16":"2014-11-14T10:43:53.964Z","0.0.17":"2014-11-14T11:07:44.063Z"},"author":{"name":"Chris Dew","email":"cmsdew@gmail.com"},"repository":{"type":"git","url":"git://github.com/chrisdew/ha.git"},"homepage":"https://github.com/chrisdew/ha","bugs":{"url":"https://github.com/chrisdew/ha/issues"},"readmeFilename":"README.md","users":{"arowon":true,"jedaviata":true}}