socketcluster
socketcluster copied to clipboard
No Worker.js and Broker.js files in socketcluster
Hey guys,
I want to install scc but when i'm trying to install app stuff with socketcluster create app
command, it creates app
but app directory
doesn't have some files like worker.js
and broker.js
.
these are what app directory has :
Dockerfile
kubernetes
node_modules
nodemon.json
package-lock.json
package.json
public
server.js
so what should I do to solve this problem? help me plz
@rasoulivand there is only one worker process since v15; in server.js
. SC now focuses purely on horizontal (multi-machine) scalability with SCC https://github.com/SocketCluster/socketcluster/blob/master/scc-guide.md
That said, you can create multiple workers using the Node.js cluster module https://nodejs.org/api/cluster.html and you can still scale vertically by running scc-broker
and scc-state
instances on a single host. Or on a large machine with many cores, you can use a load balancer like nginx to load balance between multiple SC instances running on different ports but connected to each other via SCC.
@jondubois still due to limitation of linux of 65k tcp connections after adding nginx we will be able to make only 32k connections? Isn't that correct?