-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Client-side load balancing #59
Comments
Use case:We currently have a microservice to do service discovery (based in etcd), this service gets the list of server:port to connect, and also notify any changes with a channel. Current solution:The current solution to connect microservices is put HAProxy in the middle of services to do load balance, and add/remove services, the config for HAProxy is feed with the list of services from service discovery. Pros:
Cons:
Desire Solution:Be able to use a Pros:
Cons:
|
Brilliant, thank you! Can you say more about how you interact with etcd? |
Every micro-service emits heartbeats that are register in a keyspace: Discovery service polls that keyspace and maintain another keyspace with the list of the available services based in the last activity You only need to call Discovery service to get the list of host given a service name. |
Given #67 I think the way this would work would be implementing an etcd Publisher that respected endpoint healthiness. Then that publisher can feed an e.g. RoundRobin LoadBalancer. And then, building an http.Transport that wrapped that load-balanced endpoint. Does that make sense to you? Any obvious impedance mismatches? |
Yeah, that sounds good to me. |
So, I'll close this in favor of #68. Thanks for the feedback! |
/cc @dahernan can you drop your use-case in here? It would be very helpful!
The text was updated successfully, but these errors were encountered: