node.js - NodeJS|Cluster Are process.send and worker.send blocking? If so, what's the performance? -
i have 2 questions.
are process.send , worker.send functions blocking? , performance of type of inter-process communication?
i have cluster has master pushing updates worker , workers pushing aggregated data master. however, there's particular query need latest data master. when request comes in on worker, store "response" object, process.send() contact master recent data, on master, data worker.send() send data. pass responseid , forth when request comes back, know response write , call end() function on it.
is there better way synchronous calls between processes? doesn't happen often, kind of performance implications come regard other non-blocking requests happening? hold else up? efficient way it?
are process.send , worker.send functions blocking
no.
and performance of type of inter-process communication
mostly same json serialization / deserialization. data transfer handled os , pretty fast.
is there better way synchronous calls between processes?
not in node.
it doesn't happen often, kind of performance implications come regard other non-blocking requests happening
not significant. querying database ... while database goes , job web process free respond other requests. same principal here (master -> worker).
Comments
Post a Comment