Configuration of a Streaming Mode

Streaming modes allow you to control how updates are sent from the back end, that is, the dashboard agent to the front end, that is, to the dashboard itself.

There are three streaming modes: immediate, periodic, and steady (the default).

The following properties are used to configure the streaming modes:

be.agent.dashboard.streaming.mode
be.agent.dashboard.periodic.streaming.period
be.agent.dashboard.batch.streaming.period
be.agent.dashboard.batch.content.threshold

The rest of this section explains the modes so you can select the mode that is appropriate for your needs, and it explains how the properties are used to configure them.

Immediate Mode

Every update the agent receives, for example, when a metric is created or updates, is sent to all connected clients as it occurs. No coalescing of updates is done. For example if a metric is updated each time a count increases, from one to one hundred, then one hundred updates are sent.

This mode is seldom useful in production because it is CPU-intensive and because, in most cases, it is not useful to send every update. If this mode applies to your use case, ensure that the client system can handle the load.

Periodic Mode

With this mode the dashboard agent collects data for a specified period (be.agent.dashboard.periodic.streaming.period), coalesces the updates, and then sends them to the client in one packet. Changes to the same metric property or same chart series are coalesced, and only the latest change is sent.

For example, suppose the period is five seconds, and (as with the example given for Immediate mode) during that period a metric is updated each time a count increases, from one to one hundred. With Periodic mode, only the latest update to the value is sent, with the value of one hundred. This approach is generally more desirable than sending all one hundred updates (the Immediate mode behavior), because all the prior updates are generally irrelevant.

This mode reduces the amount of data sent to the front end. However, if a large amount of data is sent in one burst (one packet), the dashboard may become unresponsive while processing it, depending on client system performance.

Steady Mode

As with the Periodic mode, with Steady mode, the dashboard agent collects data for a specified period (be.agent.dashboard.periodic.streaming.period), and coalesces the updates received during that period. However additional controls enable you to tune the system so that the optimized (coalesced) updates are sent in a steady trickle rather than in large bursts, keeping the client CPU usage steady.

With Steady mode, updates are sent in multiple packets per streaming period as defined by be.agent.dashboard.batch.streaming.period. You can also control the size of each packet, using be.agent.dashboard.batch.content.threshold.

For example, take these values:

be.agent.dashboard.periodic.streaming.period = 5000 milliseconds
be.agent.dashboard.batch.streaming.period = 1000 milliseconds
be.agent.dashboard.batch.content.threshold = 5

The result is that the agent gathers and coalesces updates for five seconds. For the following five seconds, it sends one packet (batch) per second, with up to five updates in each packet (meanwhile also coalescing the next set of updates).

If a streaming period has more updates than can be accommodated by the batch period and the batch content size, then an internal calculation determines what to do. Up to a certain point, accommodation is made. For example, depending on the load, a batch will have more (or fewer updates) than specified, or there are more (or fewer) batches per streaming period than specified. If the system determines that such accommodation will not handle increased load, then the dashboard agent switches to Periodic streaming mode. The dashboard agent logs indicate when this switch is made.