Skip to content Skip to sidebar Skip to footer

Run Web App With Gevent

I want to try playing around with gevent as a web server and application framework. I don't see any way to 'restart' the server or update the application code without killing and

Solution 1:

Gunicorn has 3 gevent workers:

  • -k gevent (using gunicorn's HTTP parser)
  • -k gevent_pywsgi (using gevent.pywsgi module)
  • -k gevent_wsgi (using gevent.wsgi module)

gevent.wsgi is a fast HTTP server based on libevent.

gevent.pywsgi is WSGI server implemented in Python.

The reason for existence of gevent.pywsgi is libevent-http having a few limitations, such as not supporting keep-alive, streaming, ssl and websockets.

Note, that the new alpha version (1.0a3) of gevent uses libev and does not include a WSGI server based on libevent-http. Currently, gevent.wsgi here is an alias for gevent.pywsgi.

The server classes in gevent don't have any features related to process management, restart, reload and so on. Those features are necessary for deployment though. Gunicorn provides that for gevent's WSGI servers. Use it.

Post a Comment for "Run Web App With Gevent"