squeaky-pl / japronto

Screaming-fast Python 3.5+ HTTP toolkit integrated with pipelining HTTP server based on uvloop and picohttpparser.
MIT License
8.61k stars 581 forks source link

Add benchmark results without pipelining #2

Closed floatdrop closed 7 years ago

floatdrop commented 7 years ago

Since almost every browser does not support pipelining it would be interesting to benchmark japronto with wrk without pipelining.

squeaky-pl commented 7 years ago

Japronto will get slower and on the same hardware. It will do about 400,000 RPS (still much faster), the other contestants will be unaffected.

Most web browsers disable pipelining because at the time HTTP 1.1 appeared there were many proxies and servers which silently dropped requests or crashed if pipelining was used.

There are other uses cases though, for example native mobile apps where you can explicitly opt-in to use pipelining and you have end-to-end HTTPS so you are sure that nobody can mess up with your traffic on the go. Such apps would typically burst with several requests on screen change to deliver several resources. If you can do that in parallel over one connection that's both good for your server and for you mobile's battery.

Another use case can be for example microservices located in the same datacenter that frequently talk to each other. In such environment you have great control over proxing and other stuff so you might opt-in for pipelining.

The scatter/gather read write technique used here can be also used for HTTP 2.0 which I want to implement at some point and then it could also benefit web browsers.

It's a shame that HTTP/1.1 pipelining was never widely adopted. Still without request pipelining Japronto does 400,000 RPS on the same hardware.

floatdrop commented 7 years ago

Closing in favour #8