We want to make clear what a policy and what a strategy is. The former is a filter which decides wether a source should be allowed or not for a particular request, e.g. we do not want to use source a for requests targeting example.com. Multiple policies could be active at the same time. A strategy instead is the algorithm that decides which source should be used next, independently from the request's target, but only based on some balancing technique that may for example want to optimise resource utilisation or prefer a source over another.
At the moment policies remove or add sources from the balancer. The store component uses policies, wether the balancer (its protected storage) has a strategy. The problem is that this way we are not able to make policy decisions per request.
Proposed solution
Let the balancer host all the sources available, independently from policy blocks
Make booster Get the sources from the store instead of directly from the balancer
When a Get is received, create a blacklist of the sources not allowed for this request based on the policies
We want to make clear what a policy and what a strategy is. The former is a filter which decides wether a source should be allowed or not for a particular request, e.g. we do not want to use source
a
for requests targetingexample.com
. Multiple policies could be active at the same time. A strategy instead is the algorithm that decides which source should be used next, independently from the request's target, but only based on some balancing technique that may for example want to optimise resource utilisation or prefer a source over another.At the moment policies remove or add sources from the balancer. The
store
component uses policies, wether thebalancer
(its protected storage) has a strategy. The problem is that this way we are not able to make policy decisions per request.Proposed solution
booster
Get the sources from the store instead of directly from the balancer