-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Time-Series Counter Storage #895
Comments
FWIW B is the easiest/winner so far |
FWIW, I use a solution like B for our internal metrics counter, with the difference I'm using Redis to collect the metrics. Basically, the trick I use when recording a "tick" is to increment a counter (or set a bit in case of "just" measuring activity/inactivity) for each interval. Since we're using Redis to collect this data, we can leverage its Every "tick", thus, leads to the following Redis command (pipelined). Here I'm recording activity for user 878, in 5m, 1h and 1d intervals. The 5m-interval expires after 2 days, the 1h-interval after 30 days, and the 1d-interval never expires:
(Yes, this keeps setting the |
I've started work on this in the tsdb branch. |
This ticket is to document an implementation for a new counter backend which will hold more data at varying granularities.
The one requirement, of course, is that it runs in SQL.
In all solutions, we would define intervals for rollups (1s, 60s, 60m, 24h). We'd additionally be using the buffers to batch write for efficiency.
Solution A: Periodic Rollups
Pros
Cons
Solution B: Trimming
Pros
Cons
The text was updated successfully, but these errors were encountered: