sincecutoff.com
← all changes

Redis adds the INCREX window counter rate limiter

Introduced 2026-05-25 · score 0.95

HOW TO USE IT

If the application needs an atomic window counter with bounds and expiration, evaluate Redis 8.8.0’s `INCREX` using an integer increment, an upper bound, and `ENX` with the window TTL.

INCREX <key> BYINT 1 UBOUND <limit> EX <seconds> ENX

WHY THIS HELPS

Review whether a Redis-backed application’s rate-limiting logic can use the new window counter command.

BEFORE THIS CHANGE

The Redis feature issue describes the prior atomic approach as `SCRIPT LOAD` plus `EVALSHA`.

REQUIREMENTS AND LIMITATIONS

  • Version: 8.8.0
  • key (required): Key whose numeric value to increment.
  • BYINT increment: Increment by a signed integer; defaults to 1 if no increment option is given. At most one of `BYINT` and `BYFLOAT` may be specified.
  • BYFLOAT increment: Increment by a floating-point amount. At most one of `BYFLOAT` and `BYINT` may be specified.
  • LBOUND lowerbound: Set the lower bound on the resulting value.
  • UBOUND upperbound: Set the upper bound on the resulting value; an out-of-bound increment is skipped by default.
  • SATURATE: Cap the result at the applicable bound instead of skipping an out-of-bound increment.
  • EX seconds: Set expiration after a positive number of seconds. At most one expiration option may be specified: `EX`, `PX`, `EXAT`, `PXAT`, or `PERSIST`.
  • PX milliseconds: Set expiration after a positive number of milliseconds. Mutually exclusive with the other expiration options.
  • EXAT unix-time-seconds: Set expiration at a Unix timestamp in seconds. Mutually exclusive with the other expiration options.
  • PXAT unix-time-milliseconds: Set expiration at a Unix timestamp in milliseconds. Mutually exclusive with the other expiration options.
  • PERSIST: Remove the key’s expiration. Mutually exclusive with the other expiration options and incompatible with `ENX`.
  • ENX: Apply the expiration only if the key currently has no TTL. Requires `EX`, `PX`, `EXAT`, or `PXAT`; incompatible with `PERSIST`.
  • Prerequisite: Redis Open Source 8.8.0 or later; `INCREX` is available since 8.8.0.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card