【egg】多进程模型 cluster-client 怎么启动了
发布于 8 年前 作者 yekexuan 4966 次预览 最后一次回复是 8 年前 来自 问答
看代码是扩展了agent和app的属性,但是没找到谁调用了cluster。。看了两天框架代码还是没懂怎么启动了
cluster(clientClass, options) {
options = options || {};
// master will find a free port as the clusterPort
options.port = this._options.clusterPort;
// agent will always be the leader
options.isLeader = true;
options.logger = this.coreLogger;
return cluster(clientClass, options);
}
3 回复
egg cluster没用,线上直接pm2
来自 KoaHub.js
@einsqing 不是推荐不使用pm2嘛。。
@einsqing https://github.com/eggjs/egg/issues