google cloud platform - GCP External LoadBalancer to gRPC backend - Stack Overflow

admin2025-04-17  4

I have a backend service that uses the gRPC protocol and runs on a VM. I have also created an instance group and configured the appropriate port for gRPC. After that, I set up an external load balancer with port 443 and forwarded traffic to the gRPC backend using HTTP/2. Additionally, I created an HTTP health check for the gRPC backend application. However, when testing, it still does not work. Is there anything I might have missed in the process of routing HTTPS traffic to the gRPC backend ? Expected xxx -> loadbalancer 443 -> backend service -> VM gRPC port 5555 ( using fake tls )

if i test using grpcurl its always got error

grpcurl fun.xyz:443 list
Failed to list services: rpc error: code = Unavailable desc = drop overloa

i trying to test using curl and i got this response.

 ~% curl  -vvv
 *  SSL certificate verify ok.
 * using HTTP/2
 * [HTTP/2] [1] OPENED stream for /
 * [HTTP/2] [1] [:method: GET]
 * [HTTP/2] [1] [:scheme: https]
 * [HTTP/2] [1] [:authority: fun.xyz]
 * [HTTP/2] [1] [:path: /]
 * [HTTP/2] [1] [user-agent: curl/8.7.1]
 * [HTTP/2] [1] [accept: */*]
 > GET / HTTP/2
 > Host: fun.xyz
 > User-Agent: curl/8.7.1
 > Accept: */*
 >
 * Request completely sent off
 < HTTP/2 415
 < content-type: application/grpc
 < grpc-status: 3
 < grpc-message: invalid gRPC request content-type ""
 < date: Sat, 01 Feb 2025 17:10:27 GMT
 < via: 1.1 google
<
* Connection #0 to host fun.xyz left intact
转载请注明原文地址:http://www.anycun.com/QandA/1744852195a88523.html