Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Rate Limiter Php Laravel Package

perimeter/rate-limiter-php

A lightweight PHP rate-limiting library from Perimeter for controlling request throughput across APIs and endpoints. Define limits and time windows to prevent abuse, smooth traffic spikes, and protect application resources with a straightforward, consistent API.

Deep Wiki
Context7

Product Decisions This Supports

  • Quota and plan enforcement: per-key request ceilings behind free/pro/enterprise tiers, trial throttles, and overage behavior — the commercial surface area most rate limiting serves.
  • Abuse and cost control: login/OTP brute-force protection, scraping mitigation, and caps on expensive downstream calls (LLM inference, SMS, payments, third-party APIs) where request volume maps directly to COGS.
  • Reliability and fairness: protecting shared infrastructure from noisy neighbors, per-tenant fairness in multi-tenant products, and backoff policy for outbound webhooks/partner syncs.
  • Build vs buy framing: the real decision is where throttling lives — framework-native (Laravel's RateLimiter facade and ThrottleRequests middleware, Symfony's RateLimiter component), API gateway/edge, or an application library. This package is nominally "buy" (MIT, zero license cost) but carries full maintenance cost, so it competes poorly against primitives already in the stack.
  • Roadmap placement: rate limiting is a platform capability that ships alongside API keys, usage metering, and plan management — not a standalone library selection. Treat adoption of any limiter as an implementation detail under that roadmap item.
  • Use cases where this specific repo surfaces: legacy or non-framework PHP services predating built-in throttling, throwaway prototypes, and as an algorithm reference for fixed-window/token-bucket approaches. It is not a candidate for net-new product work.

When to Consider This Package

Consider it only when all of the following hold:

  • The codebase is standalone PHP with no framework-provided throttling and no gateway in front of it.
  • Constraints are modest: single node, or a shared store already wired up, with fixed-window counting sufficient for the risk being managed.
  • The team accepts that a 2015-04-01 release, ~17 stars, and no repository metadata mean this is effectively unmaintained — so plan to vendor, pin, and fork it, with a named owner for patches.
  • A security review, PHP 8 compatibility check, and license/notice verification have all passed.

Look elsewhere if:

  • You are on Laravel 5.6+ or Symfony — use the built-in limiter; adding a dependency here is strictly negative value.
  • You need distributed, atomic counters (Redis + Lua), sliding-window or token-bucket precision, standard X-RateLimit-* / Retry-After headers, or per-route policy composition.
  • You need observability (hit/miss metrics, 429 dashboards), auditability, or any compliance or scale commitment.
  • You want a maintained dependency with a CVE response path. Do not introduce this into a modern production dependency graph.

How to Pitch It (Stakeholders)

To executives: Rate limiting is a revenue and reliability control, not a library choice. It lets us enforce plan tiers, protect margins on metered and third-party costs, and blunt abuse — all things the business already depends on. We can deliver that using components already in our stack at zero license cost. Adopting an unmaintained 2015 package adds security exposure and an ongoing maintenance owner without adding any capability we lack. Recommendation: no new dependency. Implement on framework-native primitives or at the API gateway, instrument it, and tie thresholds to plan tiers so limits become a visible, sellable product surface rather than an invisible guardrail.

To engineering: Treat perimeter/rate-limiter-php as a reference implementation at best — the algorithm ideas are sound, the maintenance posture is not. If we ever touch it, we vendor it, pin the version, add tests, and accept ownership. Otherwise: framework middleware backed by Redis for atomicity, standard rate-limit headers in responses, metrics on 429s, and limits expressed as configuration so product can tune them without a deploy.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
adachsoft/php-code-style