Neco Horne
Neco Horne

Reputation: 148

gRPC in AWS Elastic Beanstalk load balancer / network setup

I have been at this for a couple of days and just cant figure it out.

I have tried this with gRPC in node.js and java on Elastic Beanstalk. On a normal VPS its quite simple just create a proxy grpcpass and it's set. I would like to move my micro services over to AWS Elastic Beanstalk but cant get the gRPC to connect.

What I did:

  1. Created a new Java environment on Elastic Beanstalk and deployed my service. The gRPC server is on port 9086.
  2. I have looked around the net and the closest thing I could find to a tutorial is New – Application Load Balancer Support for End-to-End HTTP/2 and gRPC but it does not cover how to setup the load balancer for gRPC for an instance.
  3. Using the guide I made a few changes to the Target group like so:

Created a Target Group using the instances configuration enter image description here

I have tried building the target group with both http and https for port 9086, enter image description here

after creating the target group I registered the instance on the target group enter image description here

After that I went to the load balancer and created a listener on port 443 and forwarded it to the target group. Port 443 is also open on the security policy. enter image description here

The security listener settings pointing it to the AWS certificate allocated to the url. enter image description here

I have tried both http and https on the target group on port 9086 but all my gRPC client calls fail with either status 13 or 14 meaning the request is not going through. I have confirmed in the logs the gRPC server is up and running.

Does anybody know where I am going wrong here? I feel like its something simple that I am missing, just can't find any tutorials or documentation on the proper way to set this up. Is what I am trying to do even possible on AWS Elastic Beanstalk?

Upvotes: 3

Views: 1158

Answers (1)

kivagant
kivagant

Reputation: 1957

From what I see on your screens, your ALB targets were added but they did not pass the health check. Meaning, that they are not allowed to accept any traffic yet.

You can find a good sample of a gRPC application with an implemented health check in the attached file in this article:

https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/deploy-a-grpc-based-application-on-an-amazon-eks-cluster-and-access-it-with-an-application-load-balancer.html#attachments-abf727c1-ff8b-43a7-923f-bce825d1b459

Upvotes: -1

Related Questions