Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Worker.js and Broker.js files in socketcluster #524

Open
rasoulivand opened this issue Feb 17, 2020 · 2 comments
Open

No Worker.js and Broker.js files in socketcluster #524

rasoulivand opened this issue Feb 17, 2020 · 2 comments

Comments

@rasoulivand
Copy link

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

@jondubois
Copy link
Member

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

@Mukund2900
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants