keygen-sh / keygen-api

Keygen is a fair source software licensing and distribution API built with Ruby on Rails. For developers, by developers.
https://keygen.sh
Other
847 stars 58 forks source link

Partition request logs and event logs #554

Open ezekg opened 2 years ago

ezekg commented 2 years ago

Doing so would allow us to keep the logs around longer i.e. perhaps indefinitely. We should nil some fields on request logs, like request and response body, since those are likely no longer needed after 30 days. Also nil IP address.

See: https://www.johnnunemaker.com/rails-postgres-native-partitioning/

ezekg commented 2 years ago

What if we did this instead of #566? We could do load_async across the partitioned tables for e.g. counting request logs.

ezekg commented 2 years ago

Refs: