Skip to content

armgit / AiSOC

Public Imported from GitHub
0

Open-source AI Security Operations Center: alert fusion, LLM-agent triage, MITRE ATT&CK investigation, and a replayable decision ledger for every agent step. Self-hostable, runs with no API keys, MIT licensed. Ships an MCP server for Claude, Cursor and Continue.

4.4 KB
Raw Blame

ADR-0005 — Tiered storage consolidation + a $/TB cost model

Context

AiSOC persists security telemetry across several stores (ClickHouse for the queryable hot tier, Postgres for alert/case state, object storage for retention). Two questions kept coming up without a written answer:

  1. What does storage actually cost per TB of ingested telemetry? Sales, sizing guides, and the managed-mode pricing shape (ADR-0003) all need a defensible number, and "it depends" is not one.
  2. How many storage engines should the raw-event path use? Every extra engine is another thing to operate, secure (see the cross-store isolation gate, Phase 3.4), back up (Phase 3.1), and reason about.

Without arithmetic, both questions get answered by intuition, and intuition drifts. Phase 6 makes the cost a computed, gated artifact.

Decision

1. Keep a three-tier storage model for raw telemetry, do not add engines.

Tier Store Retention Why
Hot ClickHouse on block storage 30 days Interactive lake queries (/lake/sql), fusion lookbacks, hunts
Warm Object storage (standard) +60 days (to 90d) Investigations that reach back a quarter; cheaper per GB
Cold/archive Object storage (infrequent-access) +275 days (to 365d) Compliance retention; rarely read

The hot tier stays ClickHouse only — we explicitly reject adding a second hot analytical engine (e.g. a separate search cluster) for the raw-event path. The graph (Neo4j) and vector (Qdrant) stores serve different access patterns and are out of scope for this raw-telemetry tiering decision.

2. Publish a computed $/TB number and gate it.

scripts/storage_cost_model.py is the single source of truth. It is deterministic; the committed worked example is storage-cost-model.json, and scripts/storage_cost_model.py --check fails CI (.github/workflows/perf.yml) if the rate card or scenario changes without regenerating that file. The number below can therefore never silently drift.

Worked example (1 TB/day raw ingest, 8× ZSTD compression)

Tier Days resident Resident GB $/GB-mo $/mo
hot_block 30 3,750 0.080 300.00
warm_object 60 7,500 0.023 172.50
cold_archive 275 34,375 0.0125 429.69
total 902.19
  • Steady-state storage cost: ≈ $902/month at 1 TB/day.
  • ≈ $30/raw-TB ingested (total monthly ÷ 30 TB ingested/month).

These are reference list prices (2026, one representative region). They MUST be verified against your provider, region, and negotiated rates. The value of this ADR is the methodology and the tiering decision, not the exact dollar figures — which is exactly why the number is generated by a script and gated, not typed into prose.

Consequences

  • Positive. A defensible, reproducible $/TB figure for sizing and pricing. One fewer hot engine to operate/secure/back up. The cost assumptions (compression ratio, retention, rate card) are explicit and versioned.
  • Negative. Object-tier reads (warm/cold) are slower than ClickHouse; an investigation reaching past 30 days pays a latency cost. Accepted: >30-day lookbacks are rare and the cost saving is large (block is ~3.5× object).
  • Follow-up (Phase 6b, tracked in docs/audit/DEFERRED_SUBPHASES.md). Wire the model into the managed-mode sizing guide and the LLM-cost dashboard so a tenant's storage $/mo shows next to its LLM $/mo. Still open: the dashboard reports LLM spend only, and the managed-instance billing section does not mention storage.

Performance gate

Phase 6 also lands scripts/perf/throughput_harness.py, a fusion hot-path throughput benchmark (measured ~250k events/sec for promote_normalized_event on commodity CI hardware). .github/workflows/perf.yml runs it with a generous regression floor (1,000 eps — a >200× margin) so the gate fires only on a catastrophic regression such as an I/O call slipping onto the hot path, never on shared-runner jitter. It is a regression floor, not a production SLO.