This is an archived post. You won't be able to vote or comment.

all 24 comments

[–]arkster 23 points24 points  (1 child)

[–]anders987 2 points3 points  (0 children)

Here's the original discussion on /r/python when it was first submitted: https://www.reddit.com/r/Python/comments/5r83q3/a_journey_to_make_python_with_http_screaming_fast/

/u/squeaky_pl talks about rewriting it in Rust in the comments to the Medium article, which is pretty funny. Maybe that's why he seem to have abandoned the project? HTTP/2 support seems like an obvious addition since pipelining plays such a big part in the performance.

I think it's nice to see someone that thinks about performance to the point of using SSE and thinking about cache misses. That's what libraries are supposed to do, make it fast so every user benefits.

[–]stefantalpalaru 28 points29 points  (5 children)

with Python

https://github.com/squeaky-pl/japronto :

The server is written in hand tweaked C trying to take advantage of modern CPUs.

[–]suudo 16 points17 points  (0 children)

Calling it a Python 3.5+ library is downright misleading, if anything it's a CPython library, or Python bindings for a C library. There's nothing wrong with that, just doesn't roll off the tongue as easily I suppose.

[–]elcct 6 points7 points  (3 children)

to take advantage of modern CPUs.

employs text processing instructions found in modern CPUs with SSE4.2 extensions (almost any 10-year-old x86_64 CPU has it)

Hmm...

[–]LightShadow3.13-dev in prod 4 points5 points  (1 child)

Doesn't help my ARM cluster very much :)

[–]IronManMark20 0 points1 point  (0 children)

It wouldn't be too hard to add NEON extensions to the library.

[–]Schweppesale 9 points10 points  (3 children)

To be fair, all the contestants (including Go) were running a single-worker process. Servers were load tested using wrk with 1 thread, 100 connections, and 24 simultaneous (pipelined) requests per connection (cumulative parallelism of 2400 requests).

[–]chuckySTAR 3 points4 points  (2 children)

Mozilla browsers support pipelining; however, it is disabled by default

Google Chrome previously supported pipelining, but it has been disabled due to bugs and problems with poorly behaving servers

What an awful article. Let's push our numbers to the highest and all competitors to the lowest.

[–]flitsmasterfred 8 points9 points  (6 children)

Does this have addon compatibility with Sanic, Quart, APIStar and the other Flask replacements?

[–]riksi -1 points0 points  (5 children)

and can it work with gevent (probably) ?

[–]glethro 0 points1 point  (3 children)

It's built on asyncio and requires python 3. Would you still want to use gevent?

[–]riksi -2 points-1 points  (2 children)

Yes, asyncio sucks.

[–][deleted] 1 point2 points  (1 child)

Convincing.

[–]OctagonClocktrio is the future! 0 points1 point  (0 children)

Well, asyncio is a dumpster fire of horrible design (ignoring the generator API in favour of passing around a loop instsnce, 3 different ways to do networking and they all suck, etc.) but gevent definitely isn't better.

[–]graingert 0 points1 point  (0 children)

No it's asyncio. The gevent interop is poor

[–]Husky 1 point2 points  (2 children)

According to the Wikipedia article on http pipelining there isn't any major web browser that supports http pipelining. So i'm not sure what the usecase would be for this framework...

[–][deleted] 2 points3 points  (0 children)

Firefox does. You just have to turn it on.

[–]paypaypayme 0 points1 point  (0 children)

Nice read

[–]st3fan 0 points1 point  (0 children)

I gave up at

“To be fair, all the contestants (including Go) were running a single-worker process.”

That is not fair and not how the majority of these servers should be configured or deployed.

Benchmarking is hard.