0

Deploying a grpc service on AWS was pretty straight forward thanks to the built in support in their load balancer, but as far as I can tell they don't have a built in solution for grpc-web?

What would be the easiest way to add support for grpc-web for a low volume service running in ECS?

Kimble
  • 7,295
  • 4
  • 54
  • 77
  • Isn't grpc-web just a JavaScript client for GRPC? Why would AWS need to add any sort of special support for that? You just need to add the grpc-web library to your JavaScript application. – Mark B Sep 26 '22 at 12:35
  • I believed the same the same thing until I started digging into it. My understanding is that the grpc protocol requires low level access to http 2 protocol that isn't available in browsers. So in order to make it work with web you need a proxy briding in between the browser and the grpc server. – Kimble Sep 26 '22 at 15:07
  • https://blog.getambassador.io/understanding-grpc-and-grpc-web-8a4d43f58480 – Kimble Sep 26 '22 at 15:07
  • OK, so in that description the grpc-web proxy is just a proxy server accepting standard HTTP requests, which is already supported by every AWS load balancer, as well as other AWS services like AWS API Gateway and CloudFront. Again, nothing new that AWS needs to add support for. The proxy server would be something you would install and run on an AWS instance, which would then forward requests to your back-end GRPC server. – Mark B Sep 26 '22 at 15:17
  • Yes, that is my understanding. I just hoped that the load balancer had built in support for grpc-web in the same way it has support for grpc so I didn't have to deploy a proxy, but I guess there is no way around that. – Kimble Sep 26 '22 at 15:57
  • According to this: https://github.com/grpc/grpc-web Envoy is used as the proxy. To run this on ECS you would want to run Envoy as a sidecar proxy in your tasks. – Mark B Sep 26 '22 at 16:11
  • Hehe yeah that's what I had hoped to avoid. Envoy looks like such a massive complicated overkill for the tiny application I want to deploy. – Kimble Sep 27 '22 at 19:57

0 Answers0