Sorry for the crosspost. I asked this question on stackoverflow and asked a 
few of my buddies but have gotten no useful input.

http://stackoverflow.com/questions/11728933/node-js-simulating-multiple-tcp-clients-with-delays-and-getting-blocking-behavio

I'm trying to build a testing tool for an app server that has both tcp and 
http apis. The app server is a proxy server that manages a bunch of tcp 
clients and distributes the http requests to these clients, and then 
returns their responses. The current testing setup is to do M iterations 
where we send a message to all N tcp clients.

The basic version works, but when I introduce a delay in the tcp client 
responses using SetTimeout, the system starts getting timeouts for the http 
requests. I assume the problem is either:
A) tcp client delays block
B) http requests block

Here's the http request statistics I get for 2 tcp clients, 2 http requests 
for each:

No delay:
client 0: rid=b9090ff65d5e, start=1343767505729, end=1343767505745, 
delay=0, rtime=16
client 1: rid=3950e73488cc, start=1343767505731, end=1343767505742, 
delay=0, rtime=11
client 0: rid=d895fd739389, start=1343767506732, end=1343767506738, 
delay=0, rtime=6
client 1: rid=519ffa323c42, start=1343767506733, end=1343767506737, 
delay=0, rtime=4

rand(0-100) ms delay:
client 0: rid=406b42e027eb, start=1343767610712, end=1343767610736, 
delay=45, rtime=-21
client 1: rid=b1d8ce2a22a5, start=1343767610713, end=undefined, delay=14, 
rtime=NaN
client 0: rid=7e1e3c54d698, start=1343767611714, end=1343767611756, 
delay=36, rtime=6
client 1: rid=bcf21941fa1d, start=1343767611714, end=undefined, delay=41, 
rtime=NaN

Thanks in advance for any ideas!

-- 
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to