TsgcWebSocketLoadBalancerServerProperties › Throttle

Throttle Property

Caps the bandwidth (bits per second) that the load balancer reads from or writes to each connection.

Syntax

property Throttle: TsgcWSThrottle read GetThrottle write SetThrottle;

Default Value

Enabled=False

Remarks

When Throttle.Enabled is True the load balancer limits how fast data may be read from or written to any of its peer sockets, including both downstream clients and the registered backend control channels. Use it to prevent a single client from saturating the uplink or to simulate low-bandwidth scenarios during development. Throttling is applied at the socket level and is independent from MaxConnections (which caps concurrent sessions).

Example


oServer := TsgcWebSocketLoadBalancerServer.Create(nil);
oServer.Throttle.BitsPerSec := 65536;
oServer.Throttle.Enabled := true;
oServer.Active := true;

Back to Properties