GRPC w/ ECS AWS Network Load Balancer

59 views
Skip to first unread message

jdw...@gmail.com

unread,
Nov 30, 2017, 3:04:08 PM11/30/17
to grpc.io
I have an AWS ECS cluster from which I'd like to expose a GRPC service to the world.  That has.... not been easy. 

I worked around the challenge of having GPRC join a target group by running dropwizard on one port for the healthcheck and GRPC on a different port. 

That only got me to the net roadblock though which was that while ALB does accept HTTP2 it forwards it out as HTTP1 and thus I get "Unexpected HTTP/1.x request"  from grpc-java.  

I think the next option would be something like https://medium.com/applied-engineering-reporting-from-the-front/http-load-balancing-on-grpc-services-e3d702db05d7 which makes a custom multiplexer?


I thought I was stymied, but then I realized that perhaps http://docs.aws.amazon.com/elasticloadbalancing/latest/network/introduction.html   would be the right move. A layer 4 load balancer should get the HTTP2 traffic right to my GRPC server ya?   I'd be responsible for SSL termination and all that but still... 


Giving that a shot though I've gotten stuck on getting an NLBs TCP healthcheck to come back as healthy from GRPC. It's darn hard to debug so I'm wondering whether anybody else has given this a shot / can let me know whether I'm on a reasonable track here. I mostly deal with layer 4 & 7 wrt cakes. 


Thanks.

-Jeff

jdw...@gmail.com

unread,
Dec 3, 2017, 1:53:38 PM12/3/17
to grpc.io
fwiw it looks like this is going to work just fine. 

I had to run a separate process to accept HTTP1 to pass the healthcheck, this meant running static ports rather than the standard ECS dynamic ports. That's a bit sad, but functional.

Other big PITA is of course that I now need to do SSL termination myself. But c'est la vie. I'm pretty curious to compare latencies.
Reply all
Reply to author
Forward
0 new messages