Connection Overload Protection
Question
How exactly do the values connect-rate
and connect-burst-size
from the Connect Overload Protection work?
How long will HiveMQ accept messages at the rate of the burst size?
Answer
HiveMQ internally uses a token system. The burst-size
sets the initial amount of available tokens, each CONNECT
uses up a token and tokens are refreshed at the connect-rate
(per second).
If the tokens are used up and there are still incoming CONNECT
messages above the rate HiveMQ will temporary stop reading from new sockets and finally disconnect newly connecting clients.
A constant stream of CONNECTS
higher than the connect-rate
will be throttled to the configured rate, after a swing-in phase.