将HTTP 2与AWS Elastic beantalk一起使用的最佳方法是什么

Dim*_*hit 9 ruby ruby-on-rails http2 amazon-elastic-beanstalk ruby-on-rails-4.2

我有一个使用Elastic-beanstalk托管在AWS上的Ruby on Rails应用程序,现在可以与HTTP 1一起使用,我想使用HTTP2。有人可以建议我最好的方法吗?

小智 7

如果我没记错的话,当您向 Elastic Beanstalk 环境添加新的负载均衡器时,它默认使用Classic Load Balancer不支持的HTTP/2,我认为解决方案将使用Application Load Balancer支持它的 ,您可以在此处找到此信息。您还可以在创建环境时指定它,如此处所示。这将只允许HTTP/2客户端和实例之间的通信ALBALB将把这些HTTP/2请求转换为HTTP/1.1与您的实例进行通信

正如这里所见:"If end-to-end HTTP/2 is a requirement for your application you can use a Layer 4 ELB ( Classic Load Balancer with TCP listener or Network Load Balancer). If you are interested also in SSL offloading the only option for now is Classic Load Balancer with an SSL listener."