问题描述
我有两个使用gRPC进行通信的微服务.两个都是部署在ECS上的Docker应用程序.如何配置它们以使用AWS ALB?在文档中说ALB支持HTTP/2,但是我只能看到HTTP1设置.我的应用程序在8080处具有一个gRPC端口和一个运行状况检查API.如何在ALB上进行配置?
I have two microservices communicating using gRPC.Both are docker applications deployed on ECS. How do I configure them to use AWS ALB?In documentation it says ALB supports HTTP/2, however I can only see HTTP1 settings.My application has one gRPC port and one health check API at 8080.How do I configure that on ALB?
推荐答案
我不相信你可以.
ALB支持" HTTP2,但前提是它们可以接受HTTP2并在对HTTP1进行转发之前对其进行多路分解.
ALBs "support" HTTP2 but only in so far as they can accept HTTP2 and de-multiplex it before forwarding on HTTP1.
您可以使用AWS的更新版"NLB",尽管它还有其他缺点.这样做的更多详细信息 https://blog.prefab.cloud/blog/grpc- aws-some-gotchas
You can use AWS's newer "NLB" though that has other wrinkles.More details of doing this https://blog.prefab.cloud/blog/grpc-aws-some-gotchas
这篇关于使用ALB在AWS上部署支持gRPC的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!