Class TrafficShapingConfig
The traffic shaping allows you to configure various parameters, such as write and read limitations (in bytes per second), check interval (the delay between two computations of the bandwidth), and maximum time to wait. The check interval represents the period at which the traffic is computed, and a higher interval may result in less precise traffic shaping. It is recommended to set a positive value for the check interval, even if it is high, to ensure traffic shaping without accounting. A suggested value is something close to 5 or 10 minutes.
The `outbound-global-bandwidth` and `inbound-global-bandwidth` parameters represent the maximum number of bytes per second for write and read operations, respectively. Additionally, you can set the maximum time to wait, which specifies an upper bound for time shaping. By default, it is set to 15 seconds.
-
Field Summary
Modifier and TypeFieldDescriptionSet the delay between two computations of performances for channels.boolean
Enables the traffic shaping.Set bandwidth limit in bytes per second for inbound connections.Set the maximum delay to wait in case of traffic excess.Set bandwidth limit in bytes per second for outbound connections.Set the maximum global write size in bytes per second allowed in the buffer globally for all channels before write are suspended. -
Constructor Summary
-
Method Summary
-
Field Details
-
enabled
Enables the traffic shaping. -
inboundGlobalBandwidth
Set bandwidth limit in bytes per second for inbound connections. If not set, no limits are applied. -
outboundGlobalBandwidth
Set bandwidth limit in bytes per second for outbound connections. If not set, no limits are applied. -
maxDelay
Set the maximum delay to wait in case of traffic excess. Default is 15s. Must be less than the HTTP timeout. -
checkInterval
Set the delay between two computations of performances for channels. If set to 0, no stats are computed. Despite 0 is accepted (no accounting), it is recommended to set a positive value for the check interval, even if it is high since the precision of the traffic shaping depends on the period where the traffic is computed. In this case, a suggested value is something close to 5 or 10 minutes.If not default, it defaults to 1s.
-
peakOutboundGlobalBandwidth
Set the maximum global write size in bytes per second allowed in the buffer globally for all channels before write are suspended. The default value is 400 MB.
-
-
Constructor Details
-
TrafficShapingConfig
public TrafficShapingConfig()
-