SpinTheMic
Pro

Interview practice question

Sliding window rate limiter in Redis

Backend Engineering · NoSQL and Redis · Experienced

Implement a sliding window rate limiter (100 requests per 60 seconds per user) in Redis.

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Sorted set of request timestamps.
  • ZREMRANGEBYSCORE removes old entries.
  • ZCARD counts current window.
  • ZADD current request.
  • Atomic via Lua; set EXPIRE.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics