Lua vs Node vs LuaNginx
pointlessramblings.com
Lua vs Node vs LuaNginx
1–10 of 15 posts
Re: Lua vs Node vs LuaNginx
#2Maybe the same thing is happening with Lua?
Also what were the specs of the computer you ran your tests on?
Re: Lua vs Node vs LuaNginx
#3Go also hangs at the end with a lot of concurrent requests. I think it has something to do with how it time outs http connections. Maybe the same thing is happening with Lua? Also what were the specs of the computer you ran your tests on?
The tests were made on a Micro VPS from Afterburst.com (which I own), on an empty/not-yet-deployed node.
Re: Lua vs Node vs LuaNginx
#4Go also hangs at the end with a lot of concurrent requests. I think it has something to do with how it time outs http connections. Maybe the same thing is happening with Lua? Also what were the specs of the computer you ran your tests on?
Re: Lua vs Node vs LuaNginx
#5Re: Lua vs Node vs LuaNginx
#6Yet another hello world ab competition with no source code, setup, kernel parameter info or whatsoever
> My Lua/LuaJIT implementations don't process/read any header fields, nor do they send any back (it's a simple server) I would expect this is the reason Lua/LuaJIT appears to fast. However it does demonstrate that a single process can easily handle 20,000 requests/s …
facepalm
Re: Lua vs Node vs LuaNginx
#7Re: Lua vs Node vs LuaNginx
#8Go also hangs at the end with a lot of concurrent requests. I think it has something to do with how it time outs http connections. Maybe the same thing is happening with Lua? Also what were the specs of the computer you ran your tests on?
Re: Lua vs Node vs LuaNginx
#9Go also hangs at the end with a lot of concurrent requests. I think it has something to do with how it time outs http connections. Maybe the same thing is happening with Lua? Also what were the specs of the computer you ran your tests on?
Re: Lua vs Node vs LuaNginx
#10Go also hangs at the end with a lot of concurrent requests. I think it has something to do with how it time outs http connections. Maybe the same thing is happening with Lua? Also what were the specs of the computer you ran your tests on?
Does this happen with keepalive on (-k option for ab) as well? If not, it might be some network resource starvation issue (connection tracking or TIME_WAIT, try "sysctl -w net.ipv4.tcp_tw_reuse=1" or "sysctl -w net.nf_conntrack_max=655360" perhaps).
I gave up micro benchmarking because once you factor in sessions and database access then everything goes in the gutter.
I've had a Go server outperform a Node server (same box, same data, same headers) by 5x when returning large amounts of json or returning large strings in general.
As soon as I had that data get returned by a database instead of hard coded strings using both language's best drivers for that database then the reqs/s evened out, in fact Node ended up performing slightly better for both latency and reqs/s.