23

Bottle can use several webservers:

Build-in HTTP development server and support for paste, fapws3, flup, cherrypy or any other WSGI capable server.

I am using Bottle for a desktop-app and I guess that the development server is enough in this case. I would like to know if some of you have experience with one of the alternative server.

Which server for which purpose?

tshepang
  • 10,772
  • 21
  • 84
  • 127
luc
  • 37,543
  • 21
  • 117
  • 168

7 Answers7

5

Python WSGI web apps work fine in Apache, using mod_wsgi.

On Windows, I have WSGI web apps in production on IIS using isapi-wsgi

codeape
  • 89,707
  • 22
  • 139
  • 171
4

I shall recommend you with uWSGI, he is ultra fast!

Try to set up a nginx server with uWSGI-Python as backend to run your bottle app:)

Felix Yan
  • 13,432
  • 7
  • 44
  • 61
  • 2
    here you have a good quick howto for using uwsgi for bottle: https://michael.lustfield.net/nginx/bottle-uwsgi-nginx-quickstart – ignivs Jan 15 '16 at 20:22
2

I am now using waitress and it seems stable and fast. Moreover it is pure Python.

luc
  • 37,543
  • 21
  • 117
  • 168
1

For a screamingly fast, ultra-lightweight asynchronous WSGI server check bjoern. It is written in C and uses libev.

mike
  • 1,534
  • 1
  • 23
  • 31
1

Here are some pretty comprehensive benchmarks of various Python web servers...

http://nichol.as/benchmark-of-python-web-servers

I've used Cherrypy and Paste with Bottle and had no problems with either.

Dirk Calloway
  • 2,259
  • 4
  • 18
  • 32
1

Made a quick test with CherryPy, Paste, and Rocket with ApacheBench on localhost (Mac OS X 10.6) and Rocket was the fastest one. Even more stable with higher concurrency.

stesch
  • 7,115
  • 6
  • 45
  • 62
  • 4
    But in practice is your site ever going to get enough traffic that the server is going to be stretched. Benchmarks like that are meaningless. All WSGI servers will provide more than adequate performance for your typical site. More important is the suitability of a hosting mechanism to a production setting. – Graham Dumpleton Jun 21 '11 at 22:16
  • @Graham Dumpleton: Even if you never need to handle 100 concurrent requests, I would have a bad feeling using something that just fails to do so instead of just degrading in speed. – stesch Jun 23 '11 at 07:45
0

I use Gevent, is very fast, and the new version (gevent-1.1rc5) has a SSL bug fix.

Rui Martins
  • 1,503
  • 1
  • 22
  • 30