3 ms·
> I've found it trivial to make Python perform on the order of dozens of millions of requests per second Really curious. How did you achieve that? When you say
by lessclue 10y ago
> I've found it trivial to make Python perform on the order of dozens of millions of requests per second
Really curious. How did you achieve that? When you say "dozens of millions", it implies a minimum of 24+ million requests per second, which is quite unbelievable.
- notzorbo3 10y agoThrough forking + gevent and then sleeping in each request handler. Of course it measures nothing other than a whole bunch of while loops running in one fork per CPU waiting for just about nothing. In other words, I'm benchmarking "how much memory do I have", which is pointless. But it sure does scale!
- lessclue 10y agoTCP handshakes->HTTP parsing->Sleep->Response writing. Can the overhead added by these (and more) possibly produce 24+ million requests / sec on a commodity machine? Could you share some examples or snippets?
- mozumder 10y agothe way most python web apps work is they don't do the TCP handshake & http parsing, and leave that up to the front-end web server (nginx/apache/etc). Python only comes in via a fastcgi or wsgi proxy.