Selection Input API
The selection input API is used to inject user-defined data into the routing engine, making the data available for making routing decisions. Any JSON structures can be stored in the selection input.
One use case for selection input is to provide data on cache availability. For
example, if {"edge-streamer-2-online": true} is sent to the selection
input API, the routing condition eq('edge-streamer-2-online', true) can
be used to ensure that no traffic gets routed to the streamer if it’s offline.
Details on how to store data in the selection input can be found in the API overview.
Configuration
There is a configurable limit to the number of items that the selection input
can hold. This is controlled by the selectionInputItemLimit tuning parameter,
which sets the maximum number of leaf items that can be stored in the selection
input. The reason for this configuration is to prevent the selection input to
grow indefinitely. There is no harm in increasing it if needed.
$ confcli services.routing.tuning.general.selectionInputItemLimit
{
"selectionInputItemLimit": 10000
}
Some classifiers can take their
patterns from the selection input. In order for them to have the latest data in
a system with multiple instances of the Director, their selection input data
can be fetched from the AgileTV CDN Manager. This is configured with the
selectionInputFetchBase parameter:
$ confcli integration.manager.selectionInputFetchBase
{
"selectionInputFetchBase": "https://acd-manager.example.com/api/selection-input/"
}