When using the Rate Limiting Advanced plugin with an ElastiCache cluster in AWS we are specifying a limit of 10 however we are passing 15-20 transactions before receiving the error “429 - Too many requests”.
{
"message": "API rate limit exceeded"
}For example we have a limit of 10 and a window size of 30. About 20 of these requests will pass inside that 30 second window.
This type of behavior can be experienced if the Cluster is being specified as a host inside the Rate Limiting Advanced plugin.
The reason this occurs is because it is creating multiple keys for storage allowing for more than the specified limit. Under redis-cli we can run the keys command to confirm:
keys *
1) "1660576260:30:abHx1lXb5BTdBjfke34BlNInAdajk350L"
2) "1660576290:30:abHx1lXb5BTdBjfke34BlNInAdajk350L"