Home | Trees | Indices | Help |
|
---|
|
Experimetal multi-threaded web server created by Massimo Di Pierro For lack of a better we'll call it Sneaky. License: GPL2 This code would have not been possible without CherryPy wsgiserver, a great example of Python web server. - This code implements WSGI - This code is API compatible with cherrypy - It consists of less than 260 lines of code - It is multi-threaded - The number of threads changes dynamically between a min and a max - Can handle chunking (request and response) [to be tested] - supports SSL via the Cherrypy ssl adaptors You can find an example of usage at the bottom of this file. here are some tests and comparisons performed by Garrett Smith RPS = requests per second Time = average time in milliseconds to server each request Benchmark = `ab -t 10 -c <number of concurrent requests>-r http://localhost` 100 Concurrent Requests ----------------------- =============== App Server RPS ============== Fapws 7174 Landshark 4479 PHP-5 4191 modwsgi 3651 Tomcat 6 3554 Tornado 2641 Sneaky WSGI(*) 2372 CherryPy WSGI 2102 Phusion 1873 Jetty 6 937 Django WSGI 785 WEBrick 43 =============== 1,000 Concurrent Requests ------------------------- =============== App Server RPS =============== Fapws 5359 Landshark 4477 modwsgi 3449 PHP 5 3062 Tomcat 6 3014 Tornado 2452 Sneaky WSGI(*) 2415 CherryPy WSGI 2126 Phusion 1585 Jetty 6 1095 Django WSGI 953 WEBrick 50 =============== 10,000 Concurrent Requests -------------------------- =============== App Server RPS =============== Fapws 5213 Landshark 4239 Tomcat 6 2369 Tornado 2265 PHP 5 2239 Sneaky WSGI (*) 2225 modwsgi 2115 CherryPy WSGI 1731 Phusion 1247 Jetty 6 794 Django WSGI 890 WEBrick 84 =============== 20,000 Concurrent Requests -------------------------- =============== App Server RPS =============== Fapws 4788 Landshark 2936 Tornado 2153 Sneaky WSGI(*) 2130 PHP 5 1728 modwsgi 1374 Tomcat 6 1362 CherryPy WSGI 1294 Phusion 961 Django WSGI 790 Jetty 6 616 WEBrick 63 ===============
|
|||
ChunkedReader class used to read chunked input |
|||
Worker class representing a worker node |
|||
Sneaky the actual web server |
|
|||
|
|||
|
|||
|
|
|||
regex_head = re.compile(r'^
|
|||
regex_header = re.compile(r'^\s
|
|||
regex_chunk = re.compile(r'^
|
|||
BUF_SIZE = 10000
|
|||
SERVER_NAME =
|
|||
socket_errors_to_ignore =
|
|
regex_head
|
regex_header
|
socket_errors_to_ignore
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Wed Feb 3 10:53:17 2010 | http://epydoc.sourceforge.net |