Minimalist, high performance in-memory rate limiting middleware for Bun and Hono.
[Client] ---> [Cloudflare] ---> [Bun + Hono Runtime]
|
[Rate Limiter MW]
|
+--------------+-------------+
| |
[Allowed: count < limit] [Blocked: count >= limit]
| |
await next() Return HTTP 429
- Target Runtime: Bun
- Framework: Hono.js
- State Store: In-memory (
Mapobject) / future proof for LibSQL (turso) - Algorithm: Fixed window counter (v1) -> Token Bucket (v2)
- Identifier:
CF-Connecting-IPheaders