Summary
The rate limiter Redis backend currently derives sliding-window and token-bucket Lua timestamps from an integer Unix second. Multiple requests inside the same second can share the same Redis script timestamp/member prefix and token-bucket refill calculations lose subsecond precision.
Expected fix
Capture the current SystemTime duration once, pass both integer seconds and fractional seconds into the Redis evaluation path, and add deterministic tests for sliding-window member timestamps and token-bucket refill args.
Summary
The rate limiter Redis backend currently derives sliding-window and token-bucket Lua timestamps from an integer Unix second. Multiple requests inside the same second can share the same Redis script timestamp/member prefix and token-bucket refill calculations lose subsecond precision.
Expected fix
Capture the current
SystemTimeduration once, pass both integer seconds and fractional seconds into the Redis evaluation path, and add deterministic tests for sliding-window member timestamps and token-bucket refill args.