---
title: "Discussion on \"Designing a Rate Limiter: Token Bucket vs Sliding Window, and Making It Distributed\" | Hashnode"
description: "Discussion on \"Designing a Rate Limiter: Token Bucket vs Sliding Window, and Making It Distributed\". A senior deep dive into rate limiting: fixed window, sliding log, sliding counter and token bucket compared on memory and error, then Redis-backed atomic scripts, key design, hot keys, token leasing and fail-open."
url: "https://hashnode.com/posts/designing-a-rate-limiter-token-bucket-vs-sliding-window-and-making-it-distributed/6a5d8881bcf1dac70a7185ae"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Designing a Rate Limiter: Token Bucket vs Sliding Window, and Making It Distributed](https://systemdesignacademy.hashnode.dev/designing-a-rate-limiter-token-bucket-vs-sliding-window-and-making-it-distributed?utm_source=hashnode&utm_medium=feed)

A senior deep dive into rate limiting: fixed window, sliding log, sliding counter and token bucket compared on memory and error, then Redis-backed atomic scripts, key design, hot keys, token leasing and fail-open.

Jul 20 · 28 min read · systemdesignacademy.hashnode.dev  
Updated Jul 21  
Read the article

-   [#systemdesign](https://hashnode.com/tag/systemdesign)
-   [#redis](https://hashnode.com/tag/redis)
-   [#backend](https://hashnode.com/tag/backend)
-   [#distributed](https://hashnode.com/tag/distributed)

## Written by

[RONI DAS](https://hashnode.com/@ronidas)

@ronidas · India

  
[View profile](https://hashnode.com/@ronidas)

AI engineering, agentic memory, machine learning, and system design at scale.

I work on AI systems and the infrastructure they actually run on: agentic architectures, memory for agents, retrieval, and the graph and data layers that keep model output grounded in something real. Formerly at Neo4j. I also write and teach the systems side that most AI content skips, from distributed systems and databases to the design decisions that decide whether a model ever reaches production. I run Total Technology Zonne on YouTube and I am building systemdesign.academy, an interactive course on system design, machine learning, and AI engineering, covering the parts most tutorials leave as an exercise for the reader. Mock interviews and prep packs: topmate.io/roni

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
