Maintenance of Cassandra rate limit tables needed?

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

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!

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