socketcluster icon indicating copy to clipboard operation
socketcluster copied to clipboard

No Worker.js and Broker.js files in socketcluster

Open rasoulivand opened this issue 4 years ago • 2 comments

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 avatar Feb 17 '20 06:02 rasoulivand

@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 avatar Feb 17 '20 07:02 jondubois

@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?

Mukund2900 avatar Mar 14 '23 08:03 Mukund2900