Using Cloudflare Durable Objects for a Simple Counter – Limits, Code, and Pitfalls
Learn how to build a stateful counter with Cloudflare Workers Durable Objects, see the exact code, understand size and concurrency limits, and avoid common pitfalls.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Learn how to build a stateful counter with Cloudflare Workers Durable Objects, see the exact code, understand size and concurrency limits, and avoid common pitfalls.
Feature-flag lookups don't need an origin round-trip. Here's how to serve them from Cloudflare Workers KV, with a worked routing example and the consistency trade-offs you must design around.
A counter in a Worker's memory doesn't add up across locations. Here's how Durable Objects serialize per-tenant state, with a worked limiter and its limits.
Workers KV removes the origin round trip from session lookups, but its consistency model decides your logout behavior, your cache settings, and when you need Durable Objects instead.
k3OS is archived, but its one-file config.yaml model — where hostname, SSH keys, and Kubernetes cluster membership are all declared at boot — is still a design worth stealing for edge and lab clusters.
K3s ships with an embedded SQLite database that removes the need for an external etcd, but the single‑writer lock and lack of replication limit its use to single‑node or low‑write workloads.
k3OS is archived, but its headline decision — an entire node defined by one versioned config.yaml — is still the right way to think about provisioning edge Kubernetes fleets.
Set up Cloudflare Rate Limiting to guard your APIs from abuse while keeping legitimate traffic smooth. Learn how to choose between fixed‑window and sliding‑window algorithms, deploy granular rules, and verify effectiveness with built‑in dashboards and API exports.
Learn how to use Cloudflare Workers KV to share mutable state like feature flags across all edge instances, with a concrete code example, trade‑offs, and a verification checklist.