Maintenance of Cassandra rate limit tables needed?

#1

Hello,

We’ve noticed that tables ratelimiting_metrics & response_ratelimiting_metrics from Rate Limiting plugin are getting big when using Cassandra datastore.

With set per-second limits, the UPDATE queries are creating a new entry for every consumer access every new second. This can after a while e.g. slow down the admin /status call, as it does aggregation query without partition key (SELECT COUNT(*)).

Would it make sense to introduce some maintenance script for regular cleaning of old records?
Or perhaps try to adjust the table definition to use Cassandra TTL?

Cheers,
Ondrej

#2

Hi,

I think TTL makes a lot of sense for Cassandra (not on PostgreSQL unfortunately). If you end up going that routel please consider sending a PR to kong!

#3

Could I know if this TTL for Cassandra ratelimiting_metrics been done?