Questions tagged [node-cluster]

a Node.js module for multi-core network serving.

Cluster is a Node.js module for multi-core network serving.

https://nodejs.org/api/cluster.html

173 questions
2
votes
2 answers

Node.js Cluster Worker: Turn off event

Consider the following node.js cluster config. How does one turn off the callback to prevent further on message callbacks? There happens to be no off method. I have to update the callback with a new one and it appears that all the old callbacks are…
Anshuul Kai
  • 3,876
  • 2
  • 27
  • 48
2
votes
2 answers

Steps to improve throughput of Node JS server application

I have a very simple nodejs application that accepts json data (1KB approx.) via POST request body. The response is sent back immediately to the client and the json is posted asynchronously to an Apache Kafka queue. The number of simultaneous…
Ashok
  • 435
  • 1
  • 4
  • 16
2
votes
1 answer

Websokets(ws) , NodeJs Clusters,

I am building real time connection server. And want to scale it with Node Clusters I went through many different websites trying to figure out how to implement Websokets(ws) and Node clustering. So the basic idea which i wanted to try is : I have…
Dmitrii Goriunov
  • 178
  • 2
  • 17
2
votes
1 answer

Ignite C++, Server-client cluster load balancing performance issue

I have 2 nodes, in which im trying to run 4 ignite servers, 2 on each node and 16 ignite clients, 8 on each node. I am using replicated cache mode. I could see the load on cluster is not distributed eventually to all servers. My intension of having…
2
votes
1 answer

Remote Debugging of node js server using intellij

Saw lots of posts regarding the debugging of remote Node js server and tried a lot of their solutions yet did not manage to get my configuration to work I have Intellij installed on a Windows PC with the following "Node.js Remote Debug"…
2
votes
0 answers

Callback between worker and master in Node.js cluster

I have a Node application with a number of workers that serve dynamic pages. Each worker needs to have access to a central object, which contains methods to find and cache information from a 3rd party API. This object will be on the master process…
user2248702
  • 2,741
  • 7
  • 41
  • 69
2
votes
2 answers

How to pass socket to cluster in node

I would like to get a multi-process node. Workers are listening clients connections. I need pass sockets to master process because master process emit message to clients. Workers also need socket to emit message to clients. Socket is a circular…
Pepe
  • 21
  • 4
2
votes
1 answer

How to Use Node Cluster module within Express Generator App Skeleton

I am trying to use the cluster module within my Express app. I used express-generator to create my application structure, but I am not sure how to incorporate the cluster module while maintaining the separation of app.js and bin/www. I have seen…
user137717
  • 2,005
  • 4
  • 25
  • 48
2
votes
1 answer

Using babel with node cluster

I have a very simple program developed with ES6 and transpiled with Babel. import kue from 'kue'; import cluster from 'cluster'; const queue = kue.createQueue(); const clusterWorkerSize = require('os').cpus().length; if (cluster.isMaster) { …
gyss
  • 1,753
  • 4
  • 23
  • 31
2
votes
1 answer

Node cluster: Handle task only to one worker

I´m trying to set up cluster to multi-thread my app but instead of delegating one task per worker each task is being delegated to all workers. My code goes as follows: //main.js var cluster = require('cluster'); //Code executed by the master…
2
votes
1 answer

Using Node cluster module with SailsJs: EADDRINUSE

I have a SailsJs (http://sailsjs.org/) based application that has to deal with some CPU intensive tasks. In short, I want to use the cluster (https://nodejs.org/api/cluster.html) module to delegate the processing of these tasks to worker processes…
Tom Seldon
  • 510
  • 1
  • 6
  • 10
2
votes
1 answer

Node JS - Log worker cluster last exception

I'm working on Node JS server (0.10.30) along with its Cluster feature. Each time a worker terminates I catch the 'exit' event and restarting a new worker. I would like to also log (on the master cluster) the reason that worker was terminated, e.g.…
Erez O
  • 23
  • 4
2
votes
1 answer

Redis Subscribes multiple times when using Node Cluster, Socket.io

I'm working in realtime posts using socket.io, Stream is updating realtime but the problem is redis subscription happens multiple times and the post appears multiple times in the stream. I'm using node.js cluster module to create multiple node…
Srikanth Jeeva
  • 3,005
  • 4
  • 38
  • 58
2
votes
2 answers

How does Cluster keeps up with Node's single thread concept?

When you fork, or start multiple workers using something like Cluster: Are multiple threads or instances of Node process being created ? Does this breaks Node's single thread concept? How are the request handled between workers? Does Cluster…
S.D.
  • 29,290
  • 3
  • 79
  • 130
2
votes
1 answer

Clustering Node JS in Heavy Traffic Production Environment

I have a web service handling http requests to redirect to specific URLs. Right the CPU is hammered at about 5 million hits per day, but I need to scale it up to handle 20 million plus. This is a production environment so I am a little…