Skip to main content

Architecture

InfraSage is a set of loosely coupled microservices joined by a Kafka-compatible message bus and a shared ClickHouse time-series database.

Data flow

InfraSage system architecture

Services

Ingestion Gateway (:8080)

The single entry point for telemetry. It:

  • Detects the payload format on its own, whether that is Prometheus remote-write, OTLP, or JSON
  • Validates timestamp freshness, value ranges, and required fields
  • Deduplicates by content hash, so a retry cannot write the same record twice
  • Parks invalid records in the dead-letter queue for inspection and replay
  • Publishes valid records to the raw-telemetry topic

Telemetry Operator (:8081)

Consumes from Kafka and processes the stream. It translates each source format into one canonical TelemetryRecord, adds inferred metadata such as service discovery and environment tagging, and accumulates records for batched writes to ClickHouse (10,000 records by default). High-cardinality trace and span references are stored separately as exemplars.

AIops Engine (:8080 plus the :9093 webhook)

Where detection and analysis happen:

  • The Watchdog polls ClickHouse on a configurable interval and keeps a per-metric ring buffer for sliding-window Z-score analysis
  • Isolation Forest scores several metrics at once, so it catches combinations that no single metric flags
  • LLM RCA sends anomaly context to Anthropic Claude and gets back a structured root cause, suggested actions, and a confidence score
  • Vector memory is an HNSW index of past incidents that matches a new anomaly to historical patterns by meaning rather than by string
  • The runbook executor runs remediation against Kubernetes, HTTP, shell, and Slack, behind approval gates and with rollback
  • Multi-tenancy enforces RBAC, per-tenant quotas, and data isolation

Integration Poller

Polls external systems continuously: AWS CloudWatch for EC2, RDS, Lambda, ALB, DynamoDB, and S3 metrics, and Kubernetes for pod and node metrics and namespace events.

RCA MCP Server

Exposes InfraSage's RCA capabilities as a Model Context Protocol (MCP) server, so AI agents can query root-cause analysis results programmatically.

Infrastructure components

ComponentVersionPurpose
ClickHousev26+Time-series storage with MergeTree engine
Redpandav23.3+Kafka-compatible message broker
PrometheuslatestMetric scraping and alerting
GrafanalatestVisualization dashboards

Database schema (key tables)

TablePurpose
infrasage_raw_firehoseAll ingested telemetry
infrasage_exemplarsHigh-cardinality trace/span data
infrasage_telemetry_catalogService/metric discovery
infrasage_anomaliesDetected anomalies with scores
infrasage_rca_resultsRCA outputs from Claude
infrasage_incidentsCorrelated incident groups
infrasage_knowledge_baseHistorical RCA learnings
infrasage_api_keysTenant API keys
infrasage_usage_meteringHourly event counts per tenant
infrasage_billing_plansFree/Starter/Pro/Enterprise definitions
infrasage_audit_logAll state changes (365-day TTL)

Technology stack

LayerTechnology
LanguageGo 1.25 (statically compiled)
StorageClickHouse (columnar, MergeTree)
MessagingRedpanda / Kafka (franz-go client)
MonitoringPrometheus + Grafana
TracingOpenTelemetry
AIAnthropic Claude API
Vector IndexHNSW (custom Go implementation)
AuthJWT (golang.org/x/crypto)
ContainersDocker + Kubernetes
CloudAWS SDK v2