Skip to main content

Event volume

Workspace plans set monthly event volume. When a workspace reaches its monthly limit, new writes are rejected until the plan changes or the next month begins. Production workspaces require the durable event pipeline: D1 for the hot ledger index, Queue for committed-entry processing, and R2 for archive and evidence artifacts. If any binding is missing, paid workspaces reject new records instead of accepting evidence into only local Durable Object state.

Retention

Retention is capped by the workspace plan and can be narrowed per project. Records are retained for audit evidence, not unlimited debug search. Active legal holds pause retention purge and archive compaction for the selected project ledger. Holds do not expire automatically when their review date passes, and held storage still counts toward workspace usage and billing.

Event size

Single event writes are capped at 64 KB before batching. Keep metadata focused on compliance and review context.

Query pagination

Retained-event queries return up to 100 records per request. Hot record queries use the D1 ledger index. If records have already moved to archive storage, request an evidence export instead of forcing the hot query path to scan archival data. Use nextCursor to fetch older records:
let cursor: number | undefined

do {
  const page = await lodger.query({ query: "user_123", cursor, limit: 100 })
  cursor = page.nextCursor
} while (cursor)

Archive queries

Archive reads require includeArchive=true. This makes slower retrieval explicit and prevents accidental expensive scans.

Evidence exports

Evidence packages are batched ZIP artifacts. The export job is intentionally coarse-grained so large exports do not invoke workers once per event.