I am using grpc-go and want to use nginx for load balancing, but I do not understand why grpc_pass gives much worse results?
Benchmark test:
upstream "go_grpc" {
server 127.0.0.1:10000;
}
server {
listen 11000;
proxy_pass go_grpc;
}
Processed 10,000 requests in 5 seconds
Via stream{}:
upstream "go_grpc" {
server 127.0.0.1:10000;
}
server {
listen 11000 http2;
location / {
grpc_pass grpc://go_grpc;
}
}
Processed 10,000 requests in 10 seconds (2 times longer)