Streams layout
Flussonic Central attempts to ensure uniform usage of hardware resources across streamers in the cluster by allocating streams to the most suitable streamers.
The streams are allocated to the streamers in the following cases:
- When a new stream is created in Central.
- When an existing streamer fails and there is a need to reallocate the streams from it between operational streamers.
- When a new streamer is added to the cluster of servers managed by Central (or an existing streamer is restored after a failure), and there is a possibility to achieve a more even load on the servers in the cluster by reassigning some streams to that new streamer.
Note
It is not guaranteed that the same streams that ran on a streamer before failure will be returned to that streamer after recovery.
The streams layout is defined by the Channel limit parameter in the streamer settings (channel_limit in the API schema). A stream is assigned to a less loaded streamer that is defined by current number of streams divided by channel_limit
. It is guaranteed that the streamer won't run more streams than channel_limit
(6000 by default).
When the stream has Streamer hostname selected in its settings, the selected streamer has priority in the allocation process if it is not fully loaded (i.e. the number of streams on it is less than channel_limit
) or runs some streams without streamer hostname.
Setting up channel limit for a streamer in the UI
To configure the channel limit:
- Go to Streamers and select the streamer.
- Set the Channel limit parameter in the Balancing section.
Setting up channel limit for a streamer via API
To set the channel limit via the API, use the PUT /streamer/api/v3/streamers/{hostname} request, for example:
curl -u username:password --request PUT 'http://127.0.0.1:9019/streamer/api/v3/streamers/localhost' \
-H "Content-Type: application/json" \
--data '{"channel_limit":1000}'