Skip to content

New Time-Series Counter Storage #895

Closed
@dcramer

Description

@dcramer

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

  • Increment a counter for the lowest interval
  • Periodically (every 1m?) using Celery rollup counters from last job execution
  • Trim out of bounds items

Pros

  • Simple writes that are quick

Cons

  • Requires the queue to function

Solution B: Trimming

  • Increment a counter for all intervals at once
  • Periodically trim counters which are no longer used at various intervals

Pros

  • Doesnt actually require the queue to function

Cons

  • Writes can be a lot heavier if we store many intervals

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions