I've been looking through this for a week and haven't been able to find anything that has helped me. I'll be upfront, I'm new to AWS so I'm sure things are flying over my head.
Problem
I am currently writing an application which is being deployed to Elastic Beanstalk, the application is written in Spring Boot and exposes several RESTful API's, IT ALSO exposes some API's via gRPC. The AWS Load Balancer has no issues with the REST API (as expected) but I can't seem to get it to work with gRPC.
What I've tried Looked at:
As best as I can decipher there are a lot of people saying it is possible, but either I'm missing something simple or they do not provide any information on what you need to do in AWS to get it to work.
I did try the simple solution of setting up the "classic load balancer" and then having a listener for TCP on the gRPC port, but when I try to connect to the port it says "Connection refused", which makes me think the LB isn't working (opening that port) but everything says it is and it properly LB's the REST requests.
I tried using the new load balancer but I had some configuration issues and I'm waiting for someone to get back from vacation to help me sort that out.
Kubernetes
Someone had suggested I use Kubernetes (EKS in Amazon), but here again I am woefully unskilled. Would this be possible and if so any pointers?
Thanks in advance
The gRPC client connects to an Application Load Balancer through the HTTP/2 protocol with a Secure Sockets Layer/Transport Layer Security (SSL/TLS) encrypted connection. The Application Load Balancer forwards traffic to the gRPC application that runs on Amazon EKS pods.
The support for gRPC and end-to-end HTTP/2 is available for existing and new Application Load Balancers at no extra charge in all AWS Regions. To learn more, please refer to the blog post, demo, and the ALB documentation.
gRPC is an open-source remote procedure call (RPC) framework that can run in any environment. You can use it for microservice integrations and client-server communications. For more information about gRPC, see Application Load Balancer support for end-to-end HTTP/2 and gRPC on the Amazon Web Services (AWS) Blog.
But little did we know that AWS actually don’t support HTTP 2/0. So, let’s get to the root of the problem. There are 3 types of load balancers on AWS: Application Load Balancers (Layer 7 Load Balancer), Network Load Balancer (Layer 4), Classic Load Balancer.
On Oct 29, 2020, AWS announced that the Application Load Balancer (ALB) now supports the gRPC protocol. See the announcement for instructions on how to configure an ALB to handle gRPC traffic.
To use the feature on your ALB, choose HTTPS as your listener protocol, gRPC as the protocol version for your target group and register instance or IP as targets for the configured target group. ALB provides rich content based routing features that will let you inspect gRPC calls and route them to the appropriate target group based on the service and method requested. Within a target group, ALB will use gRPC specific health checks to determine availability of targets and provide gRPC specific access logs to monitor your traffic.
https://aws.amazon.com/about-aws/whats-new/2020/10/application-load-balancers-enable-grpc-workloads-end-to-end-http-2-support/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With