Skip to content

Telemetry outbox and replay

A node keeps reporting while its link to the control plane is down. Every record the telemetry mux cannot send goes to the outbox, a spool of files the xratud process keeps, and waits there until the channel can send again. The outbox delivers each record at least once, retries on the control plane's own retry hint, and deletes a record once it is accepted. It belongs to one process and is bounded, so it carries reports through a control-plane outage while the node keeps running, and the evidence it carries is also held where it originates. This page covers the spool's layout, a record's life in it, how it is bounded, and what a restart does to it.

A record's life in the outbox

flowchart TB
  MUX["Telemetry mux<br/>send failed, window open,<br/>or buffer full"]
  subgraph SPOOL["OUTBOX, one directory per channel"]
    direction TB
    APP["Append to the open segment<br/>attempts 0, next attempt now"]
    RDY{{"Ready?<br/>next attempt reached"}}
    SEND["Deliver in batch<br/>up to max_batch_records"]
    RTY["Retry later<br/>attempts + 1,<br/>next attempt + retry_after"]
    DEL["Delete<br/>segment removed when empty"]
    APP --> RDY -->|"yes"| SEND
    SEND -->|"accepted"| DEL
    SEND -.->|"refused or unreachable"| RTY
    RTY --> RDY
  end
  CP["Control plane<br/>failover and batch ingest"]
  MUX --> APP
  SEND --> CP

A record leaves the outbox only when the control plane accepted it. A batch that fails stays in the spool with its attempt count raised and its next attempt pushed back by the control plane's Retry-After, or by one second when the error carries none.

Layout

The spool lives in the process's temporary directory, named from the node's dataplane and instance identities:

xratud_status_outbox_<dataplane_uuid>_<dataplane_instance_uuid>.spool/
  status/  events/  logs/  kernel_returns/
    segments/           numbered segment files, one record per line
    checkpoint.json     the open segment, and each segment's count and size
    lock file           one writer per channel
Limit Value
Records per segment 128
Bytes per segment 256 KiB
Spool budget 64 MiB across all segments

Each append is written and flushed to disk before it returns, and the checkpoint is replaced atomically, so a record the mux handed over is in the spool even if the process stops a moment later. One writer at a time holds a channel's lock.

Each record is system.telemetry_outbox_runtime.record.v1:

outbox_id                  the record's identifier in the spool
channel                    status, events, logs or kernel_returns
mode_hint                  failover, or durable for kernel returns
record                     the metadata record as the mux produced it
attempts                   delivery attempts so far
next_attempt_epoch         the earliest time it may be sent again
last_error                 the last delivery error
created_at_epoch, updated_at_epoch

Replay

The mux replays a channel's spool after every successful send on that channel, and on every flush of a channel with an empty buffer. Replay takes the records whose next attempt has come, oldest first, up to the profile's max_batch_records, and sends them as one batch: logs through /v1/dataplane/logs/failover, events and status through their usual endpoints. Every spooled record carries an envelope identifier, so the control plane recognises a record delivered twice. See The telemetry batching mux.

A burst after an outage is replay: the node delivers what it spooled while it keeps producing new records. See Telemetry under degradation.

Bounded by budget and by intake

The spool holds at most 64 MiB. An append that would exceed it fails, and the report that produced it fails with it. The performance governor acts before that point: it holds back the logs channel once 2,000 records are waiting, and it stops the node pulling new work at 5,000, so a node in a long outage stops taking assignments before its spool fills. See Scaling and the performance governor.

Status reports have a second record in the status ack runtime, which tracks each report's acknowledgement. When the control plane accepts a status report, the acknowledgement watermark rises and the status outbox compacts up to it. See Status ack runtime.

A new process starts a new spool

The outbox belongs to one xratud process, and a starting process begins with an empty spool. What earlier records described is held where it originated:

Record Held after a restart by
Assignment status The control plane's assignment ledger; an unfinished assignment's lease lapses and it is requeued
Kernel evidence the node had not yet acknowledged The kernel's continuity store; the node replays from the position it then holds
Bodies already written Your observability bucket

See What a break never loses and Resuming telemetry delivery after a crash.