36 comments

[ 0.26 ms ] story [ 47.7 ms ] thread
I would been pleased to see this project named something else, maybe “httpx-ng” or “httpy” as I immediately link “http*2” with the obsolete http/2 protocol and not the httpx project.
I agree, the brain built in error correction makes it harder to read
By what definition is HTTP/2 considered obsolete? Are you suggesting it's been supplanted by H3?

(FWIW I agree w/ your objection to the "httpx2" name.)

Yep. All HTTP/2 features are subsumed by HTTP/3 and all HTTP/2 deployments should be focusing their effort on moving to HTTP/3.

HTTP/2 is full of growing pains and fiddly kernel config for it to perform better than even HTTP/1.1.

Moving these dependencies into userland was the path that HTTP/3 took and it has proven itself through CDN and browser adoption for years now.

I’d go as far as to say that we need to reevaluate the event loops in nginx and elsewhere to assume UDP and HTTP/3 framing instead of TCP. There are gains to be had.

Hmm, I'd define that as "deprecated", not "obsolete". Many extant H2 deployments are stable and performant, and if they're eg fronted by an H3 CDN, the migration ROI might be questionable. /$.02
Context: spent my career building CDNs at Cloudflare/facebook/pinterest.

The h3 juice is worth the squeeze. 0rtt TLS, BBR, HPACK, etc. You can roughly achieve this with a carefully configured h2 deployment across multiple layers and packages or just move to h3 and let the app layer handle it all. We baked all of the best practices into h3, the world just needs to move on.

HTTP/3 is fundamentally a different architecture than /2. To fully embrace it requires rethinking backend design significantly; just bumping a version number on HTTP without utilizing the intention of the spec is incorrect.

HTTP/1.x is not obsolete. It fills a very relevant request structure that most of the Internet still runs on.

Seems like the major gripe is over my usage of the word “obsolete” instead of “deprecated”. We could all be flipping switches instead of tapping on MacBooks but you gotta draw a line somewhere.
[dead]
httpy is actually twofold cool for a Python HTTP client!
Agreed! I love naming things :D
There is already a popular project called httpie, so httpy would be really confusing in non written form. Beside that, i completely agree, the name could be better.

https://httpie.io/

People should be aware how much worse HTTPX performs versus Aiohttp. For high scale systems it makes a massive difference
I keep confusing aiortc and aoc
I can attest of that, and in addition of harmful decisions of the maintainer that are loaded foot guns...
Noob question: what's the purpose of having so many request libraries? In JavaScript it's crazy, but in Python it's starting to feel the same: requests, httpx, httpx2...

From my perspective, HTTP requests have been mastered for years (decades?). What's the point of switching libraries? What's so extraordinary about the new HTTP library that makes requests look crap?

I understand that new protocols appear from time to time (like HTTP/2), but that's very rare. And if there are performance differences between two libraries, are they really that huge? Even if they are, 99% of people don't need that boost. What prevents someone from just improving the existing library's performance?

There can be different APIs or different technical implementations with certain performance characteristics. In this case, there isn't any purpose, though. It's just that development has slowed or stopped on the previous libraries and forking/renaming is easier than trying to continue the previous projects, for various reasons.
HTTP is a pretty complex space once you get into the nitty-gritty of use-cases, common request handling patterns & conditional/dynamic header-definitions. In general this leads to:

- (a) built-ins (& some libraries) being very verbose to use because they tend to take a "fundamentals of HTTP" approach & not implement shortcuts/common patterns

- (b) libraries commonly falling into the trap of going the opposite direction & ending up with massive scope-creep and/or oversimplified, un-expressive APIs.

This leads to a churn of libraries due to developers yearning for a Goldilocks implementation in between.

Javascript tends to be ahead of other ecosystems in churn due to ease of library publishing, Python's catching up, but overall it's the same pattern in both.

---

Also, one big additional factor is async:

- NodeJS built-ins implemented a callback pattern just before promises took off, & have struggled to upgrade to promises cleanly without breaking backward compat.

- Python's got a similar story with various generations of http library being sync, or relying on different async approaches in confusing ways.

(comment deleted)
Async ruins everything, as usual.
(comment deleted)
Everytime someone is using httpx I always wonder why use that especially when niquests exists? I feel like it has always been such a better package
HTTPX2 isn't a great name for a fork (or at all). Just leads to more confusion.

Nevertheless, I'm curious about the pros and cons when comparing with "niquests".

I thought we all moved over to Niquests and/or aiocquic and HTTP/3 these days.