booster-pocket-router / booster

Build flexible, powerful multi-homed systems
GNU Affero General Public License v3.0
25 stars 2 forks source link

Strategy & Policies: make them work together #26

Closed dmorn closed 5 years ago

dmorn commented 5 years ago

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