Hi,
I've written a simple node.js app to test throughput as an HTTP proxy when requests to the origin server have various latencies. I'm a bit surprised to find that increasing origin server latency has such a pronounced impact on proxy throughput (see attached graph).
Does anyone have any insight as to why this might be the case?
Briefly, at 0ms origin latency I can sustain 13700 reqs/s, at 500ms 9500 reqs/s, at 1000ms 5800 reqs/s, at 1500ms 4010 reqs/s, and at 2000ms 3010 reqs/s. If node.js were perfectly efficient, I'd have expected throughput to remain the same as origin latency increased.
I've got sar(1) and netstat(1) output in case anyone is interested. At 0ms latency, we saturate all 8 CPUs on the proxy, with about 55% idle CPU on the origin. As latency increases, we do an increasingly poor job of saturating the CPU (13% idle at 500ms, 45% idle at 1000ms, etc).
My testing setup is as follows: all hosts are on the same GigE subnet, with 6 dedicated client hosts, 1
dedicated proxy host, and 1 dedicated origin host. Each host is running Linux kernel 2.6.9-78EL x86_64 (an old rhel-4.x distribution which I'm stuck with, I'm afraid) and node's embedded libev is selecting the EVBACKEND_EPOLL backend. The test uses
httperf to generate load against the proxy at increasing connection
rates (e.g. 10000 conn/s, 11000 conn/s, etc), with one request per connection until increasing load does not
increase throughput. This value is taken to be the maximum throughput for the latency value being tested. Both proxy and origin are running the experimental preforking implementation that I sent out a patch for a week or so back.
Source for both node.js apps is attached, with proxy.js being the proxy, and echo.js being the origin server.
Peter
--
You received this message because you are subscribed to the Google Groups "nodejs" group.
To post to this group, send email to
nod...@googlegroups.com.
To unsubscribe from this group, send email to
nodejs+un...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en.