you could put a message queue between your udp and web servers. in this 
case you could scale them independently. as long as a delay between udp 
inbound and http outbound is acceptable, i'd go with that.

if it is ok that one udp-server and one webserver are bound together, then 
one could fork the other and comunicate other the built-in ipc channel, 
which is via unix socket. i guessthis solution would give you even faster 
ipc channel. but when you have to scale, then you scale both, which might 
be not the best thing

Am Dienstag, 13. Mai 2014 02:11:06 UTC+2 schrieb Tim Dickinson:
>
> Hey all.
>
> I would like to know from peeps what could be the best IPC.
>
> I have written this code to test what I might use.
> https://github.com/FLYBYME/node_ipc_benchmarks
>
> Background.
>
> I have a UDP server receiving messages at a high rate of speed. The server 
> stores the last 1500x1000 messages in memory.
> I have a web server that reads the messages and streams them out to 
> clients.
>
> UDP -> Memory -> WebServer -> HTTP
>
> At the moment my server is only one process. I have bottlenecks. Im 
> looking to setup a multi-process server.
>
> What I'm thinking is something like:
>
> UDP1,UDP2,UDP3 -> IPC 
> -> WebServer1-memory/WebServer2-memory/WebServer3-memory -> HTTP
>
> The UDP server/s receives messages. The UDP send the messages over TCP to 
> the web server. The web server sends the messages to multiple clients over 
> HTTP.
>
> Im looking to scale this up over many cores.
>
> From my test I have found that RAW TCP connection seems to be the best 
> performer.
>
>
> Any advice on this would be very cool.
>
>
> SIDE NOTE:
> I have thought about saving messages into a database like redis but I have 
> found that redis is really slow compared to TCP/Memory.
>
>
> Thanks
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/e5bfd473-cfe3-45ae-8bcd-a999b7ceadc3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to