java grpc lb_gRPC客户端负载平衡

This is because gRPC is built on HTTP/2, and HTTP/2 is designed to

have a single long-lived TCP connection, across which all requests are

multiplexed—meaning multiple requests can be active on the same

connection at any point in time. Normally, this is great, as it

reduces the overhead of connection management. However, it also means

that (as you might imagine) connection-level balancing isn’t very

useful. Once the connection is established, there’s no more balancing

to be done. All requests will get pinned to a single destination pod.

大多数现代的入口控制器都可以处理这个问题,但它们要么是热烘箱(nginx),要么是alpha版本(traefik),要么需要最新版本的K8S(Linkerd)。您可以进行客户端负载平衡,其中可以找到Java解决方案here。

你可能感兴趣的:(java,grpc,lb)