On Thu, Feb 26, 2015 at 1:33 AM, Ludovic Gasc <[email protected]> wrote: > To avoid TIME_WAIT, I used "sudo sysctl -w tcp_tw_recycle=1" command.
It avoid TIME_WAIT problem. But difference between keep-alive and non keep-alive is very huge although tcp_tw_recycle=1. > About Meinheld, I've tested a little bit in the past. From my little tests, > yes it improves performance, but not at the same level as aiohttp+API-Hour > version. > Moreover, to my knowledge, almost nobody use that on production, contrary to > Gunicorn. The goal was to compare the standard production setup, as > explained in Django and Flask documentation, with aiohttp.web+API-Hour. I admit that meinheld is not used well. But I think you should use some engine supporting keep-alive to compare with aiohttp. How about using nginx for both of aiohttp and sync server? wrk -(HTTP on TCP)-> nginx -(uwsgi on unix socket w/o keep-alive)-> uWSGI wrk -(HTTP on TCP)-> nginx -(HTTP on unix socket w/ keep-alive)-> Gunicorn (Tornado worker) wrk -(HTTP on TCP)-> nginx -(HTTP on unix socket w/ keep-alive)-> aiohttp Or how about don't use keep-alive on aiohttp? > > To be honest, for me, Meinheld uses a little bit black magic to try to > transform sync code to async, I don't recommend that on production for a > complex Web application. Meinheld's async feature is based on greenlet (like gevent). But you can use meinheld without using async API. It can be high performance sync server supporting keep-alive. -- INADA Naoki <[email protected]>
