wolfcode/rate-limiting
A Laravel package for adding rate limiting to your application. It provides configurable limiters and middleware to throttle requests, helping protect endpoints from abuse and excessive traffic while keeping behavior predictable and easy to tune.
Consider it when:
Look elsewhere when:
RateLimiter, Limit::perMinute()/perHour()/perDay(), and the throttle middleware, plus named limiters and per-user keys. For standard HTTP endpoints this is already solved — adopting a third-party package here adds supply-chain risk for zero capability gain.RateLimiter component or a mature token-bucket library.To executives (one paragraph): Rate limiting is a launch prerequisite for our public API and a direct control on variable cost. Laravel already includes a capable built-in limiter that covers our standard HTTP endpoints at zero added dependency risk, so this package is not a default adoption. It is worth a short evaluation because it offers algorithms and non-HTTP coverage the framework doesn't, and its permissive Apache-2.0 license means we can vendor it if we choose. Recommendation: do not add it as a dependency of record; run a two-week spike behind an internal interface so we keep the option without taking the risk.
To engineering:
RateLimiter interface from day one. That makes the choice reversible and contains the blast radius of an abandoned upstream.To product/design:
Retry-After is surfaced, and whether limits are visible in the UI. The package choice doesn't decide this — you do, and it's cheaper to decide before implementation.How can I help you explore Laravel packages today?