Matty
Matty

Reputation: 34483

Python: With gevent, is a front-end server / reverse proxy necessary?

In a related question I'm trying to figure out how a Python web application "ties together" from end to end, and I've been making the assumption that Apache/lighttpd/nginx is required with a WSGI module. (Let's assume I'm serving static content using a CDN.)

Is it possible to skip WSGI and use the gevent library to serve clients directly?

Upvotes: 3

Views: 1369

Answers (2)

Gringo Suave
Gringo Suave

Reputation: 31890

You could but won't want to for non-toy applications, as its capabilities/security are limited. Nginx is a perfect companion though.

The author of gevent recommends using gunicorn.

Skipping wsgi (rather than the second http server) doesn't make much sense. It is merely a convention for programs to interface with each other.

Upvotes: 0

Ignacio Vazquez-Abrams
Ignacio Vazquez-Abrams

Reputation: 798744

gevent doesn't include a pre-made HTTP server, but it could be possible to write one using gevent.server. It's probably easier to use a lightweight WSGI container such as Paste Deploy though.

Upvotes: 1

Related Questions