I found this great library, it is all I need (with some windows version of the same code...).
When I tested this with "siege -b -t1S -c2 127.0.0.1:8080" I found that code goes to loop all the time even if siege has stopped long time ago. I fixed it in function do_read:
if not sock.request.headers_complete then
if size == 0 then
log('Closing broken connection')
sock:close()
del_conn(sock)
end
return
end
Another issue in OSX is that every test program (ab, siege, httperf) slows down (from 7000 req/seq --> 2000 --> 150 --> 2000 req/sec). I think it must be some OSX issue with socket count. Do you know how to get constant speed (maybe reuse sockets)?
I found this great library, it is all I need (with some windows version of the same code...).
When I tested this with "siege -b -t1S -c2 127.0.0.1:8080" I found that code goes to loop all the time even if siege has stopped long time ago. I fixed it in function do_read:
Another issue in OSX is that every test program (ab, siege, httperf) slows down (from 7000 req/seq --> 2000 --> 150 --> 2000 req/sec). I think it must be some OSX issue with socket count. Do you know how to get constant speed (maybe reuse sockets)?