Skip to content

v0.2.0

Latest

Choose a tag to compare

@gpu004 gpu004 released this 25 Nov 00:48
d88b69d

Turbo now batches writes around R2's per-key write limit and keeps idempotency keys after jobs complete.

Queue behavior

  • The broker starts at most one R2 write per queue per second by default. Requests that arrive during the wait join the next batch, and the broker retries transient R2 errors.
  • Claim leases start when the broker applies the commit and last at least two commit intervals.
  • When the queue reaches its storage cap, the broker evicts the oldest completed jobs first. Pushes that still don't fit return 507 queue_full, and other operations in the batch can commit.
  • Existing R2 queue files remain readable.

API changes

  • A duplicate push for a retained completion returns 200 with duplicate: true, jobId, and completedAt. The default retention is one hour, and the storage cap can shorten it. Repeating a completion with the same lease token returns alreadyCompleted: true while the completion is retained.
  • Only claim and heartbeat responses include lease tokens. Queue inspection now includes retained completions.
  • Mutations can return 503 with Retry-After when the broker is overloaded or R2 retries are exhausted. Reuse the same idempotency key when retrying a push after storage_unavailable, since R2 may have committed it.

GitHub Actions passed lint, type checks, the Wrangler dry run, the test suite, and the TLA+ model check.

API contract · Full changelog