Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tag: 0.0.3
Fetching contributors…

Cannot retrieve contributors at this time

71 lines (46 sloc) 2.401 kb

cluster-live

Realtime administration and statistics for cluster

Installation

$ npm install cluster-live

Usage

Cluster live requires that stats() is use()ed, enabling connection and "light request" statistics. The lightRequests option simply enables light-weight request statistics better suited for realtime reporting.

 var live = require('cluster-live');

 cluster(server)
   .set('workers', 6)
   .use(cluster.debug())
   .use(cluster.stats({ connections: true, lightRequests: true }))
   .use(live())
   .listen(3000);

Options

Pass an object such as live({ port: 8889 }), with one or more of the following options:

- `port`  defaults to `8888`
- `host`  hostname
- `user`  basicAuth username
- `pass`  basicAuth password

When running in production you should use NODE_ENV=production, after which the user/pass are required.

Examples

First start the example application and cluster-live:

 $ node examples/basic.js

Visit http://localhost:8888 in your browser, and execute the following command to simulate some requests:

 $ watch --interval=0.1 curl http://localhost:3000/

Screenshots

request graphs

License

(The MIT License)

Copyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Jump to Line
Something went wrong with that request. Please try again.