publishing messages to log server problem

#1

Hi!

I made node.js log server which subscribes to onlogline event in crossbar.io. Another node.js process is publishing onlogline events and they are received by log server and written to disk and console.

My problem is that when I publish a lot of log lines it slows the publishing node.js process to one third compared to situation when it doesn’t publish them.

crossbar.io is running on separate computer from node.js applications.

Do you have any ideas what should be done to avoid slowing down of publishing node.js process?

br. Jarkko

0 Likes

#2

I was able to make publishing of events faster by creating own child process for sending log lines with node.js child_process.fork(). I just tried it and seems it works!

br. Jarkko

perjantai 27. marraskuuta 2015 11.14.07 UTC+2 Jarkko Peltonen kirjoitti:

···

Hi!

I made node.js log server which subscribes to onlogline event in crossbar.io. Another node.js process is publishing onlogline events and they are received by log server and written to disk and console.

My problem is that when I publish a lot of log lines it slows the publishing node.js process to one third compared to situation when it doesn’t publish them.

crossbar.io is running on separate computer from node.js applications.

Do you have any ideas what should be done to avoid slowing down of publishing node.js process?

br. Jarkko

0 Likes