What will pypy do for your website? Benchmarking python web servers on pypy and cpython

por em Sem categoria Nenhum comentário

"There are currently quite a few different ways of developing a web application in python.  When you add in how you deploy the application as well, there are even more choices.  In terms of application frameworks, you have at least:

  • Django
  • twisted.web
  • flask
  • bottle
  • cyclone
  • tornado
  • pyramid

Then these can be run using many different servers, including:

  • tornado
  • twisted
  • cyclone
  • wsgiref
  • rocket
  • cherrypy
  • gunicorn
  • fapws
  • google app engine
  • gevent

And many more.  Typically, these take one of several approaches.  Asynchronous either explicit (cyclone, tornado) or via monkey patch and event loop (gevent); threaded such as rocket, or written in C to use an event loop.  In addition to this, you now have several different pythons for deployment:

  • cpython
  • jython
  • pypy

At some point, these servers are generally dealing with asynchronous event loops or using threading.  The two approaches to handling this are either to program in a normal style (gevent) or to explicitly use event based programming (eg cyclone).  The rise of javascript and node.js has seen event based programming becoming more mainstream.  I wanted to find out which of these many combinations would perform best, and in particular what effect using pypy as the interpreter would have on the performance..."

http://casbon.me/what-will-pypy-do-for-your-website-benchmarki

Permalink | Leave a comment  »

Switch to our mobile site