How are instantaneous max rate limits calculated and enforced?

All Ably accounts have hard limits that are enforced to prevent abuse. See why we have to impose hourly and hard limits to ensure continuity of service for all our customers.


One such limit is an instantaneous limit, often referred to as a max rate limit (maxRate metric in error messages).  An instantaneous rate limit is calculated based on the current rate of the operation per second.  For example, a self-service packages can publish at most 200 messages per second to their Ably Reactor queues; if you exceed this, messages above that point will be suppressed. This is done on a rolling probabilistic basis; for example, if you have a queue rule that attempts to publish 300 messages per second to a queue, each one will have a 50% chance of being rejected, with the suppression probability being continuously updated based on the current attempted publish rate.


To resolve an instantaneous rate limit breach, there's no need to take any urgent action: there is no persistent block, as soon as the instantaneous rate drops below the threshold, the suppression probability will drop to zero. For messages.maxRate, the instantaneous rate is based on your package message limits, so you can upgrade the number of messages in your package to raise the rate. Reactor limits are independent of package size for self-service packages, and are only configurable for Enterprise packages.


Further reading: