Hacker News new | ask | show | jobs
by traviscline 5588 days ago
Added a basic gevent example here that is apparently about 10% better than the http.go wrt transaction rate.

https://github.com/traviscline/web_bench

(notice: I realize this is a highly synthetic benchmark and reading siege results like this is not good benchmarking)

2 comments

It's too bad the author didn't include gevent in the post, as it seems to be the fastest way to do concurrency with python (see http://nichol.as/benchmark-of-python-web-servers). I'm surprised it was faster than the Go example. I wonder if a Cython-based handler would take it even further...
I don't see the use of regexp in gvent.py.
Good call, added it, initial run didn't show a huge difference.

edit: here are numbers from a few runs: gvent,http.go 361.43,386.68 354.69,397.15 388.96,377.69 424.81,430.34

http.go averaged 26% utilization gvent.py averaged 15% utilization

I'm embarrassed posting this because of how grossly unscientific this is..

Not quite as fast as I thought initially but likely faster than the other python competitors.

Good. Next, there's a check for "GET" method and if request contains parameters at all (which returns 404 if not) in the Go version. Though, I don't think it will make a big difference.