How (if possible) to use node-cluster to schedule which worker will respond 
to a request, based on type of request e.g. one worker for write 
(POST/PUT/DELETE methods)  and 1+ worker only for read (GET)?

This is common on Load Balancing databases, where master server is for 
Write, and slaves have a carbon copy of the master data and can serve much 
faster, with less CPU usage and better query cache.

On my NodeJS web service, I have a very fast read requests, even more 
faster with varnish cache, but with a small and constant amount of write 
requests, sometimes CPU intensive, lock entire thread by 0.1s~0.3s. In this 
case, even if I just spawn the node application with both READ/WRITE 
requests, I will still have the same problem, since each WRITE request will 
slow down all process. This is why I suppose use the same strategy as some 
databases could be a good idea.

So, on this type of load balancing (workers scheduling policy based on 
WRITE/READ request), is possible use node-cluster?

Att.
Emerson

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/f3717060-6421-4f27-b294-b524c192ed58%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to