tower icon indicating copy to clipboard operation
tower copied to clipboard

Question: Looking for a service like Balance but not random

Open akiradeveloper opened this issue 4 years ago • 1 comments

My understanding is Balance updates the set of nodes by changes from Discovery and send requests so the load is balanced among the nodes.

What I am looking for is something like this but prioritize one node and other can be balanced.

Why I need is for Raft algorithm. In Raft, any client interaction is firstly sent to the leader node in the cluster but falls back to others node in case of leader failure.

Is there already Service like this? If not, can I implement this Service by combining existing parts?

akiradeveloper avatar Aug 31 '21 09:08 akiradeveloper

I would imagine you can create a simple service (layer?) that has two handles to two subservices...one that you want to use by default and a Balance<T> service. Then when your new service gets a request, if the inner default service is ready() you send the request to that, otherwise you send to the inner Balance<T> service?

LegNeato avatar Oct 31 '21 02:10 LegNeato