Re: Echo server in Lua

2015-11-19 Thread Thrawn
Nope :|. I've increased somaxconn to 512 and tcp_max_syn_backlog to 2048, but with one process, 1M requests, concurrency 500, I still get a bunch of timeouts, and the longest transaction still takes most of the test (eg 32 seconds out of a test that takes 35). Any other obvious possibilities?

Re: Echo server in Lua

2015-11-19 Thread Willy Tarreau
On Thu, Nov 19, 2015 at 07:00:32AM +, Thrawn wrote: > Hmm...I haven't tuned anything (this is just my workstation, not a server). > /proc/sys/net/core/somaxconn 128 > /proc/sys/net/ipv4/tcp_max_backlog doesn't exist > > /proc/sys/net/ipv4/tcp_max_syn_backlog512 Yep sorry it's this one. > I

Re: Echo server in Lua

2015-11-18 Thread Thrawn
Hmm...I haven't tuned anything (this is just my workstation, not a server). /proc/sys/net/core/somaxconn 128 /proc/sys/net/ipv4/tcp_max_backlog doesn't exist /proc/sys/net/ipv4/tcp_max_syn_backlog512 I guess those are pretty low for trying to thrash an echo server...any recommendations? On

Re: Echo server in Lua

2015-11-18 Thread Willy Tarreau
Hi, On Thu, Nov 19, 2015 at 03:37:33AM +, Thrawn wrote: > OK, I've decided to go a bit easier on the stress tools ;), and limited > concurrency to 500, using siege. That's resulted in some useful data > (attached). > HAProxy HTTP endpoint, with 1 process, handled up to 500K total requests > w

Re: Echo server in Lua

2015-11-18 Thread Thrawn
OK, I've decided to go a bit easier on the stress tools ;), and limited concurrency to 500, using siege. That's resulted in some useful data (attached). HAProxy HTTP endpoint, with 1 process, handled up to 500K total requests without breaking a sweat, in just under 30 seconds, achieving an actu

Re: Echo server in Lua

2015-11-18 Thread Willy Tarreau
hi, just chiming in regarding this specific point : On Tue, Nov 10, 2015 at 10:46:32PM +, Thrawn wrote: > I ran ab with concurrency 1000 and a total of 3 requests, against each > server, 5 times, plus one run each with 15 requests (sum of the previous > 5 tests).For Apache+PHP, this t

Re: Echo server in Lua

2015-11-17 Thread Thrawn
Hi, again. Actually, when I think more about it, this service needs to support SSL, so a Layer 7 implementation is needed.Also, when I put the TCP applet under any degree of stress (as little as 100 request with concurrency 10), it hangs? The other two implementations (http-req vs http applet) s

Re: Echo server in Lua

2015-11-11 Thread PiBa-NL
Hi Thrawn, I tried these configs, and there doesn't seem to be much if any difference. The tcp one might even be the slowest in my limited virtualized tests, but only my a few milliseconds.. frontend lua-replyip bind192.168.0.120:9010 modehttp http-request

Re: Echo server in Lua

2015-11-10 Thread Thrawn
Hmm...I seem to be able to set up something in TCP mode, and it returns the expected response via curl, but its performance is awful. I must be doing something wrong? Lua: core.register_action("tcp-echo", {"tcp-req"}, function (txn)     local buffer = txn.f:src()     txn.res:send("HTTP/1.0 200 OK

Re: Echo server in Lua

2015-11-10 Thread PiBa-NL
b.t.w. if sole purpose of the frontend is to echo the ip back to the client. You should probably also check the 'use-service' applet syntax, i dont know if that could be faster for your purpose. Then another thing to check would be if you want to use the tcp or http service mode. A TCP service c

Re: Echo server in Lua

2015-11-10 Thread Thrawn
OK, some explanation seems in order :). I ran ab with concurrency 1000 and a total of 3 requests, against each server, 5 times, plus one run each with 15 requests (sum of the previous 5 tests).For Apache+PHP, this typically resulted in 5-15ms response time for 99% of requests, with the r

Re: Echo server in Lua

2015-11-10 Thread Baptiste
On Tue, Nov 10, 2015 at 10:46 PM, Thrawn wrote: > OK, I've set this up locally, and tested it against PHP using ab. > > HAProxy was consistently faster (99% within 1ms, vs 5-15ms for PHP), but at > request volumes over about 35000, with concurrency 1000, it consistently had > a small percentage of

Re: Echo server in Lua

2015-11-10 Thread Thrawn
OK, I've set this up locally, and tested it against PHP using ab. HAProxy was consistently faster (99% within 1ms, vs 5-15ms for PHP), but at request volumes over about 35000, with concurrency 1000, it consistently had a small percentage of socket disconnections. PHP had timeouts - or very long

Re: Echo server in Lua

2015-11-08 Thread Thrawn
Thanks, Baptiste. I've had a go at setting that up, but found an issue in the process: I can't build HAProxy with Lua support unless I install the OpenSSL headers. Which I don't have any particular interest in doing, since I don't need SSL support.I notice that there was a patch in March to be a

Re: Echo server in Lua

2015-11-03 Thread Baptiste
On Tue, Nov 3, 2015 at 5:53 AM, Thrawn wrote: > Now that HAProxy has Lua support, I'm looking at the possibility of setting > up an echo server, which simply responds with the observed remote address of > the client (currently implemented in PHP as $_SERVER['REMOTE_ADDRESS']; ?>). > > > Does an