1
votes

I am building a python program as worker using gRPC (and with etcd as a discovery service) to communicate with server, need proxy feature for load balancing, fault-tolerant and so on. While the golang client have some build in load balancing, it is absent in python client.

I found this scheme here

lb scheme

In my scenario:
Etcd for Service Registry
gRPC between Host and Service Provider

My question is that, Is there an existing program can serve as LB(in the pic) for this scheme, which can resole service name from Etcd, and do load balancing between gRPC service. Or how can I write minimum code to implement it (get help form existing library).

1

1 Answers

1
votes

Depending on how your services are deployed, Envoy as a proxy might be a good candidate for the load balancer in this architecture.

While these examples all use Kubernetes, they provide a decent example for how to set up the architecture.

You might also want to consider using the look-aside load balancing architecture described here. In that case, you would want to look around for implementations of the grpclb protocol like this one.