# pylon-balancer

> balancer for pylon

Latest version **0.0.40** (published 2013-12-01) · 0 weekly downloads

## Install

```sh
npm install pylon-balancer
pnpm add pylon-balancer
yarn add pylon-balancer
bun add pylon-balancer
```

Provides the command `pylon-balancer`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.40 |
| Published | 2013-12-01 |
| First published | 2012-09-30 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | 0.6.x |
| Dependencies | 6 |
| Known vulnerabilities | 0 (+7 in 3 direct dependencies) |
| Install scripts | no |
| Maintainers | guybrush |

## Links

- npm: https://www.npmjs.com/package/pylon-balancer
- npm.io page: https://npm.io/package/pylon-balancer

## Dependencies (6)

- [jade](https://npm.io/package/jade.md) 0.28.1
- [debug](https://npm.io/package/debug.md) 0.5.0
- [pylon](https://npm.io/package/pylon.md) 0.0.24
- [lodash](https://npm.io/package/lodash.md) 1.3.1
- [optimist](https://npm.io/package/optimist.md) 0.3.1
- [http-proxy](https://npm.io/package/http-proxy.md) 0.8.7

## Recent versions

- 0.0.40 (latest) — 2013-12-01
- 0.0.38 — 2013-07-26
- 0.0.36 — 2013-03-07
- 0.0.34 — 2013-03-01
- 0.0.33 — 2013-02-28
- 0.0.32 — 2013-01-18
- 0.0.31 — 2012-10-31
- 0.0.29 — 2012-09-30

## README

# pylon-balancer

[![build status](https://secure.travis-ci.org/guybrush/pylon-balancer.png)](http://travis-ci.org/guybrush/pylon-balancer)

this is a [pylon]-client which queries/subscribes the pylon-server for keys
holding arrays containing proxy-informations. these proxy-informations will
be used to create a proxy-table for [http-proxy].

* apps can report for duty by telling the pylon-server the proxy-informations
* one or more pylon-balancers can connect to the pylon-server and proxy
  requests according to the proxy-informations
* pylon-balancer implements sticky-sessions per ip (idea shamelessly stolen
  from https://github.com/indutny/sticky-session)

## cli

TBA

## api

TBA

## example

balancer-server (pylon-client + http-server):

``` javascript
var pb = require('pylon-balancer')({namespace:'balancer'})
pb.connect(3000) // a pylon-server
pb.listen(80) // balancer-server
```

application (pylon-client):

``` javascript
var p = require('pylon')()
p.connect(3000) // a pylon-server
p.set
( 'balancer'
, { routes : ['foo.bar.com']  // routes which should be proxied to the app
  , port   : 3434             // the port on which the app is listening
  , host   : ''               // optional, per default it will use the
                              // ip-prefix of the pylon-key
  } )
```

[pylon]: https://github.com/guybrush/pylon
[http-proxy]: https://github.com/nodejitsu/node-http-proxy

---
_Source: https://npm.io/package/pylon-balancer · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
