LearnBoost / cluster

Node.JS multi-core server manager with plugins support.
http://learnboost.github.com/cluster
MIT License
2.29k stars 159 forks source link

Collecting custom data from workers when using a Cluster #101

Open shimonchayim opened 13 years ago

shimonchayim commented 13 years ago

his is what I have: 1) I have a cluster 2) As workers execute commands sent by the Master, workers also gather some stats 3) I want to collect these stats from the workers and consolidate it on the Master Here are my questions: 1) Is there a way to send a custom commands to worker so that is bound to my function which collects custom stats? 2) Is it possible to extends stats() itself?

tj commented 13 years ago

the stats() repl function is not very extensible right now unfortunately, but as for the data itself you can definitely extend it. the workers and master just have a .stats prop. take a look at stats() and cluster-live to see how you can add your own functions to send data to master