Subject: [Doh] HTTP/2 and constrained environments

From: Mateusz Jończyk <[email-masked]>
Date: Fri, 1 Jun 2018 12:23:04 +0200

W dniu 23.05.2018 o 23:13, Patrick McManus pisze:
> On Wed, May 23, 2018 at 5:40 AM, Mateusz Jończyk <[email-masked]
> <mailto:[email-masked]>> wrote:
> 
> 
>     How difficult it would be to implement HTTP/2 on a home router with 8 MB of
>     flash and 32 MB of RAM? Would it at all be possible? 
> 
> 
> no problem really. HTTP/2 provides a number of mechanisms for either peer to
> scale things down (e.g.reducing state in the compression dictionary, limiting
> the number of outstanding streams , small flow control windows, etc ).

HTTP/2 may be larger in code size and this is a serious limitation in home
routers (it is in most cases a more important limiting factor then RAM size). It
will probably also be more difficult to implement (in terms of coding effort).

> 
> searching for nginx and dd-wrt yields lots of howto's
> https://www.dd-wrt.com/phpBB2/viewtopic.php?t=312701&sid=dfc6638ad8a57c7d3540d4b3aae828d3 
> .. nginx has http/2 support.
> 
I suppose it is feasible to run NGINX only on high-end routers. There are
high-end routers with lots of RAM (like 128MB and more) and ability to mount
external media (USB or SD card or Samba network drives).
The router mentioned in the forum thread (Linksys WRT1900ACv2) is one of the
highest-end router models supported by DD-WRT and is very expensive.
AFAIK NGINX will not easily run on routers with 32 MB RAM and 8 MB flash, at
least not without consuming much of the precious resources.

> 
>     Would it be much more
>     difficult to implement than HTTP/1.0? All of my routers support only
>     HTTP/1.0 in
>     the management interface.
> 
> 
> I'm just speculating, but I suspect that has more to do with https and the
> challenges of provisioning certs on that kind of device than anything else.

Two of my three routers support HTTPS, so it seems it does not have much to do
with enabling HTTPS (the third router is a really constrained device with 16MB
of RAM and 2MB of flash).
I suppose that it has much to do with simplicity of protocol and ease of
implementation. There are few benefits to upgrade a router management interface
to support HTTP/1.1 or HTTP/2.0.

>  
> 
>     Would it be beneficial to specify that DNS API clients SHOULD support DNS API
>     servers that only talk HTTP/1.0 or HTTP/1.1?
> 
> 
> imo we shouldn't be explicitly encouraging older protocols.

Why not? They may be deprecated, but still may be a better choice in some cases
(as outlined above).

Greetings,
Mateusz