legend

0.0.2 • Public • Published

legend

A redis backed node.js load balancer. Uses round-robin to load balance servers. It listens for changes in your redis database and updates the server list.

Getting Started

var Legend = require('legend');
var redis  = require('redis');
var client = redis.createClient();
 
var legend = new Legend({
  client: client,
  subscribe: 'servers' // <---- Tells redis to subscribe here
});
 
// Add the first server
legend.addNode('192.168.1.1', '8080');
 
// Add the second server
legend.addNode('192.168.1.2', '8080');
 
// Finally run the server
legend.run(8080);

Readme

Keywords

none

Package Sidebar

Install

npm i legend

Weekly Downloads

2

Version

0.0.2

License

none

Last publish

Collaborators

  • westoque