Re: [PATCH] check_client_connection: use tcp state on linux

2017-03-21 Thread Simon Eskildsen
Looks like Puma encountered some issues with some Linux distro's kernels not supporting this. That's crazy.. https://github.com/puma/puma/issues/1241

Re: [PATCH] check_client_connection: use tcp state on linux

2017-03-21 Thread Eric Wong
Awesome! Thanks for the update. I'll merge ccc-tcp-v3 into master soon and push out 5.3.0-rc1 (Maybe there's need to quote at all, every message is archived forever in several public places: https://bogomips.org/unicorn-public/ https://www.mail-archive.com/unicorn-public@bogomips.org

Re: [PATCH] check_client_connection: use tcp state on linux

2017-03-21 Thread Simon Eskildsen
> I prefer we use a hash or case statement. Both allow more > optimization in the YARV VM of CRuby (opt_aref and > opt_case_dispatch in insns.def). case _might_ be a little > faster if there's no constant lookup overhead, but > a microbench or dumping the bytecode will be necessary > to be sure

[PATCH] check_client_connection: use tcp state on linux

2017-03-21 Thread Simon Eskildsen
The implementation of the check_client_connection causing an early write is ineffective when not performed on loopback. In my testing, when on non-loopback, such as another host, we only see a 10-20% rejection rate with TCP_NODELAY of clients that are closed. This means 90-80% of responses in this