Hello,

I have a node tcp service that accepts json messages (custom protocol) and does some async operations with these data (db queries)

My problem is that the clients may send in messages too fast, that i cant consume them at that rate. Ideally, i should be able to ask the clients to lower their sending rate, but implementing this at the protocol should be a bit complicated, but also feels like reinventing the wheel.

I was thinking of using stream.pause on the connections, but i am not sure how this works internally. Does it just buffer the data in memory, or using some tcp protocol pause?

Thank you,
Dan Milon.

--
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
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 post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to