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(2w ago)011↓100%MITPHPPHP ^8.2CI passing

Since May 22Pushed 2w 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 1w ago

READMEChangelogDependencies (5)Versions (5)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

42

—

FairBetter than 88% of packages

Maintenance97

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

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

15d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6a08d6eb390f4a00c5bee2b583f2a499d50cad08c632af3c2f1cc21b4dbd4001?d=identicon)[tchubaba](/maintainers/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

[spatie/laravel-responsecache

Speed up a Laravel application by caching the entire response

2.8k8.7M64](/packages/spatie-laravel-responsecache)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

76318.2M110](/packages/laravel-mcp)[mike-bronner/laravel-model-caching

Automatic caching for Eloquent models.

2.4k55.1k1](/packages/mike-bronner-laravel-model-caching)[spatie/laravel-export

Create a static site bundle from a Laravel app

670139.5k6](/packages/spatie-laravel-export)[iazaran/smart-cache

Smart Cache is a caching optimization package designed to enhance the way your Laravel application handles data caching. It intelligently manages large data sets by compressing, chunking, or applying other optimization strategies to keep your application performant and efficient.

2119.7k](/packages/iazaran-smart-cache)[calebdw/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

15104.9k4](/packages/calebdw-larastan)

PHPackages © 2026

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