Skip to content

Realtime administration and statistics plugin for Cluster

Notifications You must be signed in to change notification settings

caike/cluster-live

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cluster-live

Realtime administration and statistics for cluster

Installation

$ npm install cluster-live

Usage

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

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

Optionally a port, host and TLS options options may be used to customize and secure the cluster-live server. To run in production set NODE_ENV=production, and add a user / pass for the basicAuth middleware.

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 <[email protected]>

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.

About

Realtime administration and statistics plugin for Cluster

Resources

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published