fastwsgi icon indicating copy to clipboard operation
fastwsgi copied to clipboard

Gunicorn Worker similar to Meinheld

Open viig99 opened this issue 3 years ago • 1 comments

Is there a way to create a Gunicorn worker similar to what meinheld has done? https://github.com/mopemope/meinheld/blob/master/meinheld/gmeinheld.py#L11

It can be used as: gunicorn --workers=2 --worker-class="egg:meinheld#gunicorn_worker" gunicorn_test:app

  • Falcon + Meinheld benchmarks
Running 1m test @ http://localhost:5000
  8 threads and 100 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     1.66ms  103.47us   8.59ms   79.39%
    Req/Sec     7.26k   600.67    42.37k    95.17%
  Latency Distribution
     50%    1.68ms
     75%    1.73ms
     90%    1.75ms
     99%    1.84ms
  3468906 requests in 1.00m, 588.86MB read
Requests/sec:  57719.43
Transfer/sec:      9.80MB
  • Falcon + fastwsgi bechmarks
Running 1m test @ http://localhost:5000
  8 threads and 100 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     1.41ms   95.10us   3.54ms   67.27%
    Req/Sec     8.57k   532.54    15.80k    66.10%
  Latency Distribution
     50%    1.46ms
     75%    1.48ms
     90%    1.49ms
     99%    1.58ms
  4093388 requests in 1.00m, 456.74MB read
Requests/sec:  68187.13
Transfer/sec:      7.61MB

Having a gunicorn worker for fastwsgi might help people test it out in their own production workload easily.

Note: Seeing 18% improvement over meinheld albeit on hello world benchmarks for cythonized falcon.

viig99 avatar Dec 17 '21 04:12 viig99

There might be a way...

I would have to look into this a bit more. I would also accept a PR.

Thanks for opening this issue though, this could be a really nice feature to add to FastWSGI

jamesroberts avatar Dec 19 '21 11:12 jamesroberts