Answer the question
In order to leave comments, you need to log in
What is the best way to pass data between local nodejs applications?
There are an unlimited number of applications between which you need to transfer JSON-packed data in such a way that all "listening" applications receive this data.
Implemented via nodejs.dgram - reuseAddr = true , each application listens to one port and sends data to it.
But there is a problem - only one application receives the data (in my case, the one that was launched first)
Is there a way to modify it based on udp dgram in such a way that the data reaches each "listening" application.
Or is it better to use other methods? If so, which ones?
Answer the question
In order to leave comments, you need to log in
Option 1: write a microservice that will raise the server on a unix-socket and will simply proxy all the data from each connection to all the others.
Option 2: don't fence your bikes and use redis pub/sub or similar.
Option 3: don't fence your bikes and use any message queue like ZeroMQ
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question