0.1.0 • Published 14 years ago

connect-load-balance v0.1.0

Weekly downloads
5
License
-
Repository
github
Last release
14 years ago

Connect-load-balance

Connect-cache is a middleware for Connect framework. It provide an HTTP proxy for many servers in backend. You just have to provide web servers IPs or domain name.

Usage

var connect_load_balance = require('connect-load-balance'),
    connect = require('connect');
var ips = ['web1.example.com', 'web2.example.com:8080'];
connect.createServer(
  connect.cookieParser(),
  connect_load_balance({backends: ips})
).listen(3000);

First note : you must call cookieParser middleware before load balancer, because the proxy set a session cookie to client. Second note : this middleware must be the last called.

Installation

$ npm install connect-load-balance