PyCon: Using Coroutines to Create Efficient, High-Concurrency Web Applications

Using Coroutines to Create Efficient, High-Concurrency Web Applications

Here's the summary:
Creating high-concurrency python web applications is inherently difficult for a variety of reasons. In this talk, I'll discuss the various iterations of application server paradigms we've used at meebo, the advantages/disadvantages of each approach, and why we've settled on a coroutine-based WSGI setup to handle our high-concurrency web applications going forward.
They started with CGI. Then they switched to mod_wsgi. Then they switched to Twisted. Finally, they switched to gevent and Gunicorn. They said that this was the best of both worlds.

Guido said, "I hate callback based programming."

The speaker showed a great chart which showed the strengths and weaknesses of the various approaches.

Gunicorn is a lightweight WSGI server. It has worker processes. It supports gevent.

mod_wsgi is fast. However, if you use Gunicorn with multiple processes, it'll beat mod_wsgi.

Use Greins to manage Gunicorn.

gevent-profiler is useful.

Comments