Skip to content

akyuujs/akyuu-cluster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

akyuu-cluster

Cluster module for Akyuu.js.

Usage

akyuu.startCluster(listeners);
akyuu.startCluster({
    onFork: function() {
        // ...
    }
});

listeners is optional and it contains several listeners.

  • onFork(worker)
  • onDisconnect(worker)
  • onExit(worker, code, signal)
  • onUnexpectedExit(worker, code, signal)
  • onReachReforkLimit()

Refer to https://github.com/node-modules/cfork#example.

Configuration Block

{
    cluster: {
        workerCount: <worker count>,
        entry: <your entry code filename>,
        limit: <refer https://github.com/node-modules/cfork#options>,
        duration: <refer https://github.com/node-modules/cfork#options>
    }
}

All configuration is optional but you'd better specify entry.

About

Cluster module for Akyuu.js.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published