TsgcWebSocketLoadBalancerServer › Properties › MaxConnections
Maximum number of concurrent TCP connections (downstream clients plus registered backends) accepted by the load balancer.
property MaxConnections: Integer read GetMaxConnections write SetMaxConnections;
0 (unlimited)
When MaxConnections is greater than zero the load balancer refuses new incoming TCP connections once the limit is reached; existing sessions are unaffected. The counter includes both downstream client sessions and the long-lived control channel kept open by each registered backend server, so size the limit accordingly. Use this property to protect the host from resource exhaustion under sudden load. A value of 0 disables the limit. Bear in mind that capping connections at the load balancer does not prevent a backend from being oversubscribed — add capacity caps on each backend as well.
oServer := TsgcWebSocketLoadBalancerServer.Create(nil);
oServer.Port := 80;
oServer.MaxConnections := 10000;
oServer.Active := true;