---
title: "Comment by johson on \"Designing a High-Throughput Distributed Rate Limiter: From Token Bucket to Redis Lua Scripts\" | Hashnode"
description: "Using a Lua script for refill, validation, and token consumption is the key step here. Without atomic execution, concurrent clients can read the same token coun"
url: "https://hashnode.com/posts/designing-a-high-throughput-distributed-rate-limiter-from-token-bucket-to-redis-lua-scripts/6a6819f5eb4dce2b3ac4f4a7/comment/6a992c676880da1c8c636b55"
---

[Discussion](https://hashnode.com/posts/designing-a-high-throughput-distributed-rate-limiter-from-token-bucket-to-redis-lua-scripts/6a6819f5eb4dce2b3ac4f4a7)

Comment [Designing a High-Throughput Distributed Rate Limiter: From Token Bucket to Redis Lua Scripts](https://hashnode.com/posts/designing-a-high-throughput-distributed-rate-limiter-from-token-bucket-to-redis-lua-scripts/6a6819f5eb4dce2b3ac4f4a7)

[johson](https://hashnode.com/@johsonom)

[Sep 3](https://hashnode.com/posts/designing-a-high-throughput-distributed-rate-limiter-from-token-bucket-to-redis-lua-scripts/6a6819f5eb4dce2b3ac4f4a7/comment/6a992c676880da1c8c636b55)

Using a Lua script for refill, validation, and token consumption is the key step here. Without atomic execution, concurrent clients can read the same token count and both succeed, allowing the real request rate to exceed the configured limit.
