Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 

Repository files navigation

@nanoolabs/rate-limiter

Minimalist, high performance in-memory rate limiting middleware for Bun and Hono.

High Level Architecture (Planning)

[Client] ---> [Cloudflare] ---> [Bun + Hono Runtime]
|
[Rate Limiter MW]
|
+--------------+-------------+
|                             |
[Allowed: count < limit]      [Blocked: count >= limit]
|                             |
await next()                  Return HTTP 429

Core Strategy

  • Target Runtime: Bun
  • Framework: Hono.js
  • State Store: In-memory (Map object) / future proof for LibSQL (turso)
  • Algorithm: Fixed window counter (v1) -> Token Bucket (v2)
  • Identifier: CF-Connecting-IP headers

About

Rate limiting middleware for Bun and Hono

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors