v1.1.3
Performance
- Atomic Redis Lua scripts — combine ban check + hit + violation tracking in a single
EVALSHAround-tripHIT_SCRIPT: atomic INCR + PTTL + PEXPIRE (1 round-trip, down from 1-2)HIT_WITH_BAN_SCRIPT: atomic ban check + hit + violation + auto-ban (1 round-trip, down from 3-4)
- EVALSHA with NOSCRIPT recovery — scripts loaded once via
SCRIPT LOAD, called by SHA hash. Auto-reload on Redis restart or script eviction - Eliminates race conditions between separate ban check and hit calls
Added
HitWithBanResultinterface onHitLimitStore— stores can declare atomic hit+ban supporthitWithBanoptional method on store interface — enables single round-trip path- Dual-path limiter: atomic path (stores with
hitWithBan) vs fallback path (separate calls)
Internal
- Limiter detects
hitWithBanon store and uses atomic path automatically - Custom stores without
hitWithBancontinue to work via fallback path - Legacy methods (
isBanned,ban,recordViolation) preserved for backward compatibility - Zero breaking changes — all existing code works identically
Tests
- Added 12 new Redis Lua script tests per package (both Node.js and Bun):
- Atomic hit counting, violation tracking, ban triggering
- Already-banned detection, key independence, resetAt correctness
- Legacy method round-trips, reset clearing all keys
- Concurrent atomicity: parallel hits → sequential counts
Docs
- Full landing page overhaul with scroll animations, animated counters, install banner
- Navigation redesign with runtime tabs (Node.js / Bun)
- Benchmark fair-play disclaimers across all docs, READMEs, and benchmark pages
- Package READMEs overhauled with accurate v1.1.3 benchmark data
Packages
| Package | Version |
|---|---|
@joint-ops/hitlimit |
1.1.3 |
@joint-ops/hitlimit-bun |
1.1.3 |
@joint-ops/hitlimit-types |
1.1.3 |
Author: @tanv33
Full Changelog: v1.1.2...v1.1.3