-
Notifications
You must be signed in to change notification settings - Fork 86
Description
Summary
Add support for a new generic multi-routing-key Listener type and an initial priority failover strategy.
Motivation
Presently the Listener configuration has exactly one routing key. Service traffic to that Listener is routed by the skupper router network to one of the reachable Connector locations with a matching routing key using a link-cost biased least-connected load balancing strategy. For many use cases this approach is insufficient, and can greatly increase deployment complexity (e.g. deploying a proxy in front of multiple listener services.)
By introducing a multi-routing-key Listener type, users are enabled to specify Connectors in a granular or hierarchical fashion that suits their use case without losing the ability to expose those Connectors from a single listener address.
Proposal
Add a new resource: skupper.io/v2alpha1 MultiKeyListener
MultiKeyListenerSpec will keep identical semantics to the ListenerSpec for the following fields: host, port, tlsCredentials. MultiKeyListenerSpec will omit the exposePodsByName field, which will remain applicable only for Listener types. Instead of a routingKey field, MultiKeyListenerSpec will contain a strategy object of type MultiKeyListenerStrategy where multiple routingKeys and any additional routing parameters are configured.
MultiKeyListenerStrategy will have fields for each strategy type and will enforce exactly-one semantics. Initially there will be a single option: PriorityFailover, but should be ready for extension with additional strategies.
priorityFailover PriorityFailoverStrategySpec
PriorityFailoverStrategySpec will contain an array of routingKey strings in preference order.
Example Use Case
A service is deployed in many AZs. At a particular Site, the user prefers all traffic be routed exclusively to the nearest available geographic instances. The user configures overlapping Connector definitions for routingKeys "backend-all" and "backend-{{ AZ }}" then configures a MultiKeyListener with PriorityFailover in preference order.
apiVersion: skupper.io/v2alpha1
kind: MultiKeyListener
metadata:
name: ex01
spec:
host: example-01
port: 8000
strategy:
priorityFailover:
routingKeys:
- backend-us-east-1
- backend-us-east-2
- backend-all