AWS Elastic Load Balancer (ELB) v2 是否支持 Next Protocol Negotiation (NPN)

Does AWS Elastic Load Balancer (ELB) v2 support Next Protocol Negotiation (NPN)

我想将 AWS Elastic Load Balancer (ELB) v2 Application Load Balancer 与 HTTP 2.0 结合使用。我想知道它是否支持在官方规范中被 ALPN 取代的 Next Protocol Negotiation (NPN)。

我需要 NPN,因为我有一些较旧的 Android 客户端需要它使用 HTTP 2.0。 NGINX 有能力在没有 SPDY 的情况下开启 NPN(我不需要 SPDY,只需要 NPN)。由于ELB是基于NGINX的,所以我认为它可能会被启用。

查看 ELB 文档,我看不到 ALPN 或 NPN 的提及。

使用 curl 连接到应用程序负载均衡器实例表明它同时支持 NPN 和 ALPN。

没有选项:

$ curl --verbose -I --http2 https://example.com 2>&1 | grep ALPN
* ALPN, offering h2
* ALPN, offering http/1.1
* ALPN, server accepted to use h2

告诉 curl 明确不使用 ALPN:

$ curl --no-alpn --verbose -I --http2 https://example.com 2>&1 | grep NPN
* NPN, negotiated HTTP2 (h2)

在这两种情况下,请求都是使用 HTTP/2 提供的。

我针对针对新 EC2 实例 运行 nginx 的应用程序负载均衡器在端口 80 上进行了测试(即,后端支持的内容没有区别)。