momentohq / momento-cli

Official CLI for Momento Serverless Cache
Apache License 2.0
48 stars 10 forks source link

fix: use heuristics to determine when to query ddb table ttl #307

Closed bruuuuuuuce closed 6 months ago

bruuuuuuuce commented 6 months ago

The describe_time_to_live api call is heavily throttled, we don't want to have to call it for every dynamodb table. This pr separates out the describe ttl call into a separate function, and only calls it on tables who have at least an average of 100tps over the course of a month. We can tune this heuristic later on

Before Screen Shot 2024-04-11 at 11 49 41 AM

After Screen Shot 2024-04-11 at 11 36 38 AM