Exploring GRPC load balancing with Dgraph

I was curious if anyone experimented with setting up GRPC load-balancing for Dgraph with clients that would also live on the same Kubernetes cluster in something like Linkerd, Itsio, Consul Connect, or other service mesh.

For context, Kubernetes SVC just randomly chooses a connection to one of the Dgraph Alpha pods, so for long lived HTTP/2 connection, which is what GRPC uses, long live connection will have all the txn on a single pod rather than distributing the traffic. Article about this:

I have been looking at the documentation around Linkerd, it seems that you have to setup a service profile, and maybe some additional metrics. At least with linkerd, the starting point in the docs is this:

3 Likes

I am seeing traffic going through, I added a network policy that I think is blocking everything but 8143 (which is the proxy port). When I upload data/schema from modified pygraph example script, I see the following: