HaiAI123

Curated Global AI Tools Directory

NewHot story
93
heat index
New

Token Reservation in Redis Replaces Per-Request Rate Limiting

10/03/2026 — 10/03, 18:49·1 sources·1 reports

Story overview

On October 3, 2026, a DEV Community post argued that per-request rate limiting should be replaced with token reservation as the way to keep LLM spending under control. The reasoning is that two requests can differ enormously in cost: one may be a single-line question, while another kicks off an agent run that makes a dozen model calls, each one resending a longer context than the last. A request limit counts both as one, so it does nothing to cap the real expense.

The post points out that the obvious alternative — counting tokens after each response — does not hold up either. Concurrent requests all observe that they are under the limit before they run, so they all pass, and the limiter stops limiting anything. The rule the author proposes is therefore to limit tokens directly: reserve an estimated amount before the call, then correct that reservation once the actual usage is known.

Alongside the rule, the post lays out the questions any implementation has to answer: what exactly gets counted, at what point in the request lifecycle it is counted, and where the counter itself lives. The material does not include a reference implementation, concrete code, or results from shipping the approach in a particular product; it stays at the level of the rule and the design points it implies. As it stands, the discussion ends with the proposal and its rationale having been stated.

AI-generated from 1 reports · updated 2 hours ago

Latest turnA single request can be a one-line question or an agent run that makes a dozen model calls, and a request limit counts both the same. The post argues for limiting tokens instead: reserve an estimate before each call and correct it after, covering what to count, when to count it, and where the counter lives.

24-hour heatpeak 99 · 3h ago
24 hours agonow

Reports on this story headlines open the original

Today
  1. A single request can be a one-line question or an agent run that makes a dozen model calls, and a request limit counts both the same. The post argues for limiting tokens instead: reserve an estimate before each call and correct it after, covering what to count, when to count it, and where the counter lives.

    DEV Community · AIAI score 76

Other stories people are talking about

How is heat calculated?About the method

Heat counts how many independent sources covered a story in the last 48 hours: one source counts once no matter how many posts it published, decaying with a 24-hour half-life. What ranks first is what many people are talking about.

This page aggregates public feeds. Headlines and summaries are machine-organized and remain the property of the original authors; verify important facts at the source.

Surge
Discussion rising fast
New
First report within 6 hours
Rising
Still gathering discussion

Back to the hot board →