An open API service indexing awesome lists of open source software.

https://github.com/indutny/node-balancer

Node load balancer
https://github.com/indutny/node-balancer

Last synced: 7 days ago
JSON representation

Node load balancer

Awesome Lists containing this project

README

        

==Installation
npm install balancer

==Usage
From console:
node-balancer [config-file]
By default [config-file] = ./app.balancer

Config file must contain valid JSON object

Example config:
{
"servers" : [
"127.0.0.1:8080",
"127.0.0.1:8081"
],
"addr" : "127.0.0.1:80",
"hostname" : "www.google.com",
"spread" : {,
"include": ".*",
"exclude": "\\\\.json$"
}
}

"servers" - servers list
"addr" - balancer address
"spread" - balancer can spread request to random server
use this option to configure rules of spread
"include", "exclude" - should contain RegExp