Skip to main content

Event Ingestion

The edge daemon delivers events to the cloud via a single HTTP endpoint: POST https://api.quintai.dev/v1/ingest. The ingest service authenticates the deploy token, validates the payload, stamps org_id, and publishes to an SNS FIFO topic for fan-out.
Earlier versions of Quint used NATS JetStream for fan-out. In 2026-Q1 the cloud was redesigned around SNS FIFO + SQS for managed delivery and simpler ops. NATS has been removed from the production path.

Edge-side forwarder

internal/cloud/forwarder.go in the daemon: The forwarder is non-blocking. If the buffer fills faster than it drains, oldest events are dropped — telemetry is lossy under pathological load, never the critical path.

Wire format

Each request body:
Schema validated server-side at ingest. Max 500 events per request, max 10 MB payload.

Authentication

Header: Authorization: Bearer <deploy_token> The ingest service SHA256-hashes the token and looks it up in Redis (write-through cache backed by the api_tokens Postgres table). The response carries the org_id, which is stamped on every event before fan-out. Token types: See Auth Overview for the full token hierarchy.

Fan-out

After validation, each event is published to SNS FIFO topic quint-events-{env}. Three SQS queues subscribe:
  • quint-events-pipelinepipeline service → writes to Postgres actions (partitioned by month)
  • quint-events-sessionssession-processor → upserts sessions table
  • quint-events-alertsalert-processor → evaluates rules → writes alerts
FIFO ordering is per-session (MessageGroupId = session_id), so the session-processor sees a session’s lifecycle events in order even under parallel consumption.

Session lifecycle events

Separate endpoint: POST /v1/sessions/ingest. Payload is a single LifecycleEvent:
Types: session_start, session_resume, session_end. The session-processor service upserts the cloud sessions row and emits an SSE event to connected dashboard clients.

Observability