Redis Metrics Datastore
Technical reference for Redis-based operational metrics aggregation used within the AircraftOps platform, including hourly request counters, access decision statistics, and dashboard aggregation workflows.
Metrics Aggregation Pipeline
Operational request and access decision metrics are aggregated in Redis using time-bucketed counters. Application services and edge authorization components emit structured metric increments into Redis keys partitioned by organization and hourly time bucket.
Application / Edge Request
↓
Metric Event (Access Decision / Request Log)
↓
Redis Hourly Counter Write
↓
Time-Bucketed Hash Key
↓
Dashboard Aggregator (API Service)
↓
Admin Dashboard Metrics
This design enables extremely low-latency metric ingestion without requiring synchronous database writes or analytics queries during request execution.
- Redis acts as a high-throughput in-memory aggregation layer
- Metrics are partitioned by organization and hourly bucket
- Dashboard queries read aggregated values rather than raw event streams
- Aggregation windows are configurable by time horizon
- Downstream analytics pipelines may persist long-term aggregates to S3/Athena
Key Structure
Metrics are stored using Redis hash keys representing a single organization and hourly time bucket.
hour:ORG:{org_id}:{YYYYMMDDHH}
- Partition dimension: organization identifier
- Time dimension: hourly UTC bucket
- Value type: Redis hash counters
Stored Metrics
| Field | Purpose |
|---|---|
| total | Total request count recorded for the hour |
| allowed | Number of successful access decisions |
| denied | Number of rejected access decisions |
| error | Requests resulting in internal errors |
| status:{code} | HTTP status code distribution counters |
Dashboard Aggregation Flow
The dashboard aggregation service retrieves hourly bucket hashes across a configurable time window and merges them into a single response containing totals, per-hour timeline values, and HTTP status distributions.
Admin Dashboard Request
↓
Aggregation Service
↓
Batch Redis Pipeline Fetch (hour buckets)
↓
In-memory Merge + Totals Computation
↓
Dashboard Metrics Response
- Pipeline reads minimize Redis round-trip latency
- Aggregation returns totals, hourly timelines, and status distributions
- Empty buckets are returned as zeroed timeline entries for chart continuity
Operational Notes
- Redis serves as the short-term operational metrics store for dashboards
- Hourly bucket partitioning enables efficient rolling-window queries
- Metrics ingestion remains independent from the primary datastore
- Long-term retention is handled by downstream analytics pipelines