All Labs
Edge Computingbeta

Edge Rate Limiter

A globally distributed rate limiter running at the edge with token-bucket and sliding-window algorithms backed by Cloudflare Durable Objects.

Technology Stack

Cloudflare WorkersDurable ObjectsTypeScriptHono

Capabilities

Features Explored

Key capabilities implemented in this experiment

feature_01.ts
Sub-5ms rate-limit decisions globally
feature_02.ts
Token-bucket and sliding-window algorithms
feature_03.ts
Per-IP, per-user, and per-key keys
feature_04.ts
Burst handling and graceful degradation
feature_05.ts
Integrates cleanly with the API security playbook

Insights

Key Learnings

What I discovered while building this

Durable Objects make consistent counting at the edge surprisingly clean
Latency budgets shrink fast - every microsecond matters in the hot path
Falling open on Durable Object errors is safer than failing closed for most APIs
Want an edge security audit? Book one.

Note: This is an experimental project in the beta stage. It represents a learning exercise and technical exploration rather than a production-ready solution. Code and patterns may change significantly.

Interested in this technology?

I'm always happy to discuss experiments and share learnings. Let's connect if you're exploring similar ideas.

Get in Touch

Command Palette

Search for a command to run...