Comment by toomim
3 years ago
That'd be great, but is a lot harder than adding a header. HTTP/2 changes the entire wire format into a binary protocol that multiplexes multiple streams over a single connection. It's a lot harder to implement than HTTP/1, which you can type out manually over telnet:
telnet news.ycombinator.com 80
GET / HTTP/1.1
Host: news.ycombinator.com
\n
\n
Adding a header could be as simple as:
HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Multiple-Subscriptions: OK
The limit applied only to browsers which have all implemented HTTP/2 at this point.
Yes, the limit is implemented in browsers, but it's for the protection of servers. The idea is to prevent a web app from DDOSSing a server somewhere.
This is especially a problem for servers implemented with one thread or process per connection, rather than an async event queue like nodejs, because each thread takes up a few megabytes of memory, and if a browser opens 1000 connections, that's 2 gigs of memory right there.
But if a server is implemented properly to support long-lived connections (by using node, or greenlets, or other async system) then it should be able to opt out of that browser protection. A standardized header would allow a server to opt out of it.