billflare.

D1 billing incident and circuit breakers

Nathan Schram describes D1 write risks and circuit-breaker approaches.

Products
D1Workers
Source
Author experienceLittle Bear Apps
Author
Nathan Schram

Key points

  • The author describes duplicate work in an embedder and a harvester that reinserted existing rows. He recommends deduplication and INSERT ... ON CONFLICT DO UPDATE for repeated records.
  • His breakers have three scopes: a feature budget for each function in a project, a project budget that aggregates its features, and a global emergency stop across projects.
  • The article describes operation-count monitoring through wrapped bindings and a Queue-to-Analytics-Engine path, so monitoring does not add D1 writes. A budget check runs about every 30 seconds.

Original sources

  1. Undated

Durable Objects

Standard Agents: two loops, a reported $8,846 bill.

Justin Schroeder and Boyd describe the same Standard Agents incident: two Durable Objects ran unbounded loops. Justin reports an $8,846 bill and a later bill adjustment.

Author experienceWorkers +4

Cloudflare billing pitfalls thread

The author organizes Cloudflare billing risks by product and shares experience with budget alert emails.

Community resourceWorkers +1

Cloudflare cost playbook

A community playbook for Cloudflare cost retrospectives, cost models, and code review.