When a rate limit on your account is exceeded, we will reject new operations, such as publishing messages, until the rate limit period has passed.  Therefore, messages are not discarded unpredictably within the system, and instead only new requests that cannot be completed in full by the system due to limits on your account, will be rejected.  


For example, you have hit an instantaneous per second rate limit, then we will only reject new published messages for that second, and the block will be removed in the following second interval.  Please note that for hourly rate limits, the limits are applied based on a clock hour as opposed to a rolling hour window, and monthly limits are applied based on a calendar month.


Error messages sent to clients once a rate limit has been imposed, will typically include the metric within the error message. See an example error message below:


Rate limit exceeded; request rejected (nonfatal); 
metric = channel.maxRate; 
interval = 2018-01-05:10:10:3; 
permitted rate = 5000; 
current rate = 5015; 
scope = channel:[YOUR APP ID]:[YOUR CHANNEL] 
(status: 429, code: 42910) (code: 42910, http status: 429)


The limit hit with this error is described by the metric attribute channel.maxRate.  The following table lists out all metrics and what they represent:


MetricTime period for blockDescription
Connections
connections.hardThe block is removed as soon as the number of connections is reduced to within your account limits.
You have reached the peak number of concurrent connections allowed for your package.
Upgrade your package and buy more connections.
connections.maxCreationRateWithin a few seconds once the rate drops.You have exceeded the max rate of new connections allowed per second on your account.  The allowed creation rate will increase as you upgrade the number of connections on your account.
Use our limits calculator to work out what package you need.
Messages
messages.monthly.hard.countThe block is removed in the next calendar month.
You have reached the maximum number of messages allowed for your package in the calendar month.
Find out more about how Ably counts messages.
Upgrade your package and to buy more messages.
messages.monthly.hard.data
The block is removed in the next calendar month.
You have reached the maximum bandwidth allowed for your package in the calendar month. The bandwidth allowed on your account is calculated as the total number of messages you have purchased multiplied by the default message size allowed of 2KiB.
Find out more about how Ably counts message bandwidth.
Upgrade your package and to buy more messages.
messages.hourly.hard.count
The block is removed in the next clock hour.
You have reached the maximum number of messages allowed for your package in the current clock hour.
Find out more about how Ably counts messages.
Upgrade your package and to buy more messages.
messages.hourly.hard.data
The block is removed in the next clock hour.
You have reached the maximum bandwidth allowed for your package in the current clock hour. The bandwidth allowed on your account is calculated as the total number of messages you have purchased multiplied by the default message size allowed of 2KiB.
Find out more about how Ably counts message bandwidth.
Upgrade your package and to buy more messages.
messages.maxRate
Within a few seconds once the rate drops.
You have reached the maximum per second rate of published and received messages allowed for your package.
Find out more about how Ably counts messages.
Find out why we have per second limits.  
Use our limits calculator to work out what package you need.
messages.maxBandwidthWithin a few seconds once the rate drops.
You have reached the maximum per second bandwidth rate for all published and received messages allowed for your package.
Find out more about how Ably counts message bandwidth.
Find out why we have per second limits.  
Use our limits calculator to work out what package you need.
messages.perConnection.maxOutboundRate
Within a few seconds once the rate drops.
The rate of outbound (subscribed) messages per second from Ably to the client has been exceeded.  This will typically result in the Ably platform forcibly detaching channels for your client to reduce the rate of messages sent to that client.  Consider reducing the volume of messages sent to each client as the rate is probably unsustainable for most remote clients.
messages.perConnection.maxInboundRateWithin a few seconds once the rate drops.
The rate of incoming (published) messages per second from your client to Ably has been exceeded.  This will result in Ably rejecting messages that are published.  Consider reducing the volume of messages sent to Ably.
channel.maxRate
Within a few seconds once the rate drops.
You have reached the maximum per second rate of messages published on a single channel.  Consider reducing the number of messages you publish per second, or shard your channel traffic across multiple channels.  
Please note that there is no subscribe rate limit on channels, only a publish rate limit.
The rate of messages received on a channel is only limited by the total number of messages allowed on your account and the account-wide messages.maxRate limit described above.
Find out more about how Ably counts messages.
channels.maxBandwidthWithin a few seconds once the rate drops.
You have reached the maximum per second bandwidth rate from messages published on a single channel.  Consider reducing the number of messages you publish per second, or shard your channel traffic across multiple channels.  
Please note that there is no subscribe rate limit on channels, only a publish rate limit.
The rate of messages received on a channel is only limited by the total number of messages allowed on your account and the account-wide messages.maxRate limit described above.
Find out more about how Ably counts message bandwidth.
messages.maxSizeNoneThe message you have published exceeds the max message size allowed for your package.  Upgrade to a paid account if you are on a free account, or contact us if you need larger messages on a paid package.
Channels
channels.hard
The block is removed as soon as the number of active channels is reduced to within your account limits.
You have reached the peak number of actively used concurrent channels allowed for your package.
Upgrade your package and buy more channels.
Find out how to avoid this limit
connections.maxCreationRate
Within a few seconds once the rate drops.
You have exceeded the max rate of new channels allowed per second on your account.  The allowed creation rate will increase as you upgrade the number of channels on your account.
Use our limits calculator to work out what package you need.
channels.perConnectionThe block is removed as soon as the number of attached channels is reduced by the effected client.
The realtime client has attached to the maximum number of channels allowed per connection.  
Find out more about the max number of channels allowed per account and how to correct common problems leading to this problem. 
API requests
apiRequests.hourly.hard
The block is removed in the next clock hour.
You have exceeded the allowed number of REST API requests (excluding any token requests) in any clock hour.
Use our limits calculator to work out what package you need.
Upgrade your package and to buy more messages, which will also increase your allowed.
apiRequests.maxRate
Within a few seconds once the rate drops.
You have exceeded the max rate of REST API requests (excluding any token requests) per second.
Use our limits calculator to work out what package you need.
Upgrade your package and to buy more messages, which will also increase your allowed.
Token requests
tokenRequests.hourly.hard
The block is removed in the next clock hour.
You have exceeded the allowed number of token requests in any clock hour.
Use our limits calculator to work out what package you need.
Upgrade your package and to buy more messages, which will also increase your allowed.
tokenRequests.maxRate
Within a few seconds once the rate drops.
You have exceeded the max rate of token requests per second.
Use our limits calculator to work out what package you need.
Upgrade your package and to buy more messages, which will also increase your allowed.
Reactor
reactor.httpEvent.maxRate
Within a few seconds once the rate drops.
You have exceeded the max number of outbound HTTP requests per second using the Reactor Event feature to Serverless Functions (or custom endpoints if you have that enabled).
reactor.amqp.maxRate
Within a few seconds once the rate drops.
You have exceeded the max number of outbound messages per second using the Reactor Queues or Reactor Firehose.


Further reading: