PHPackages                             tchubaba/tiered-throttle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. tchubaba/tiered-throttle

ActiveLibrary[HTTP &amp; Networking](/categories/http)

tchubaba/tiered-throttle
========================

A progressive, tier-based rate limiter for Laravel.

v1.0.1(2mo ago)018MITPHPPHP ^8.2CI passing

Since May 22Pushed 2mo agoCompare

[ Source](https://github.com/tchubaba/tiered-throttle)[ Packagist](https://packagist.org/packages/tchubaba/tiered-throttle)[ RSS](/packages/tchubaba-tiered-throttle/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (5)Versions (7)Used By (0)

Tiered Throttle
===============

[](#tiered-throttle)

A progressive, tier-based rate limiter for Laravel. Instead of a binary "allowed or blocked" approach, this package tracks IP reputation and escalates through increasingly strict tiers of rate limiting before reaching a full lockout.

Features
--------

[](#features)

- **Tier-based escalation:** Move users through multiple levels of throttling (e.g., Tier 0 → Tier 1 → Tier 2 → Lockout).
- **Reputation-based:** Penalties persist via an "offense count" in the cache.
- **Anti-Flood Escalation:** Only one offense escalation is allowed per time window, preventing a single burst from causing an immediate ban.
- **Forgiveness:** Offenses automatically expire after a configurable period of clean behavior.
- **Lockout:** Total ban for a set period after all tiers are exhausted.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require tchubaba/tiered-throttle
```

Then, publish the configuration file:

```
php artisan vendor:publish --tag="tiered-throttle-config"
```

Configuration
-------------

[](#configuration)

The configuration file `config/tiered-throttle.php` allows you to define named limiters with their own tiers:

```
'limiters' => [
    'show-snipto' => [
        'tiers' => [
            [20, 60],   // Tier 0: 20 attempts per 1 minute (baseline)
            [10, 120],  // Tier 1: 10 attempts per 2 minutes (first offense)
            [5,  300],  // Tier 2: 5 attempts per 5 minutes (second offense)
        ],
        'lockout_seconds' => 43200, // 12 hours lockout after third offense
        'offense_ttl'     => 7200,  // 2 hours of clean behavior to reset to Tier 0
    ],
],
```

Usage
-----

[](#usage)

Apply the middleware to your routes using the `tiered.throttle` alias followed by the limiter name:

```
Route::get('/api/data', function () {
    // ...
})->middleware('tiered.throttle:show-snipto');
```

Console Commands
----------------

[](#console-commands)

### Unban an IP

[](#unban-an-ip)

If an IP has been locked out or reached a high tier, you can reset it manually:

```
php artisan throttle:unban 1.2.3.4
```

You can also specify a specific limiter:

```
php artisan throttle:unban 1.2.3.4 --limiter=show-snipto
```

Testing
-------

[](#testing)

```
composer test
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance88

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~3 days

Total

2

Last Release

60d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/81190198?v=4)[Daniel da Silva](/maintainers/tchubaba)[@tchubaba](https://github.com/tchubaba)

---

Top Contributors

[![tchubaba](https://avatars.githubusercontent.com/u/81190198?v=4)](https://github.com/tchubaba "tchubaba (6 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")

### Embed Badge

![Health badge](/badges/tchubaba-tiered-throttle/health.svg)

```
[![Health](https://phpackages.com/badges/tchubaba-tiered-throttle/health.svg)](https://phpackages.com/packages/tchubaba-tiered-throttle)
```

###  Alternatives

[mike-bronner/laravel-model-caching

Automatic caching for Eloquent models.

2.4k96.5k1](/packages/mike-bronner-laravel-model-caching)[spatie/laravel-responsecache

Speed up a Laravel application by caching the entire response

2.8k9.0M69](/packages/spatie-laravel-responsecache)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k15.1M136](/packages/laravel-pulse)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M133](/packages/roots-acorn)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[api-platform/laravel

API Platform support for Laravel

58174.6k17](/packages/api-platform-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
