intelligence_src_6dc544294b7f21f98a
- Source-provided label
- Publisher RSS metadata
- Evidence class
- mentioned in report
- Confidence
- Not reported
- Observed
- Dec 04, 2026 06:20 UTC
- Retrieved
- Dec 04, 2026 06:27 UTC
Introduction A B2B inventory platform sets a simple limit: 100 requests per minute per API key. It stops a misbehaving script that once took the database down. It also starts rejecting a large customer's ERP integration every evening at 7 pm, when the ERP pushes the day's stock movements in a two-minute burst. The customer's IT team opens a ticket titled "Your API is unreliable." B2B traffic is bursty by nature. Integrations run on schedules, users upload files at month-end, and batch jobs start at the top of the hour. A rate limiter that treats every burst as abuse punishes exactly the customers who integrate most deeply. In this article you will learn how common rate-limiting algorithms behave under bursts, how to implement a per-tenant token bucket in Redis, how to weight expensive endpoints, and how to separate rate limits from concurrency limits. How Algorithms Behave Under Bursts Fixed windows count requests per calendar minute. They are simple but allow up to double the limit around window boundaries and reject everything after the limit is hit, even if the tenant was quiet for the previous hour. Sliding windows smooth the boundary problem but still treat the limit as a hard ceiling over the window. The token buckets model what most B2B systems actually want: a bucket holds up to a maximum number of tokens (the allowed burst), refills at a steady rate (the sustained limit), and each request spends a token. A tenant that has been quiet can burst up to the bucket size; a tenant that is constantly busy is held to the refill rate. A Per-Tenant Token Bucket in Redis Run the bucket logic atomically in Redis with a Lua script so concurrent API servers share one view of each tenant's bucket. -- KEYS[1] = bucket key, ARGV: capacity, refill_per_sec, now_ms, cost local cap, rate, now, cost = tonumber(ARGV[1]), tonumber(ARGV[2]), tonumber(ARGV[3]), tonumber(ARGV[4]) local b = redis.call('HMGET', KEYS[1], 'tokens', 'ts') local tokens = tonumber(b[1]) or cap local ts = tonumber(b[2]) or now tokens = math.min(cap, tokens + (now - ts) / 1000 * rate) local allowed = tokens >= cost if allowed then tokens = tokens - cost end redis.call('HSET', KEYS[1], 'tokens', tokens, 'ts', now) redis.call('PEXPIRE', KEYS[1], math.ceil(cap / rate * 1000) + 1000) local retry_ms = allowed and 0 or math.ceil((cost - tokens) / rate * 1000) return { allowed and 1 or 0, math.floor(tokens), retry_ms } Set capacity and refill rate per plan. A plan might allow a sustained 10 requests per second with a bucket of 1,200, so a quiet integration can send a burst of over a thousand requests before being slowed. Return the remaining tokens and the retry delay in response headers so clients can pace themselves. Weighting Expensive Endpoints Not all requests cost the same. Fetching one order is cheap; exporting a year of orders or running a search with wildcards is not. Assign each endpoint a cost in tokens, such as 1 for simple reads, 5 for searches, and 50 for exports, and pass that cost to the limiter. This keeps the limit meaningful without forcing a separate limit for every endpoint. Offer bulk endpoints that accept many records in one request. A customer importing 5,000 stock movements as 50 requests of 100 items each puts far less load on your system than 5,000 single-item calls and is much less likely to hit any limit. Concurrency Limits Are Different Rate limits control how many requests start per second. They do not stop a tenant from running 200 slow reports at once. Add a separate concurrency limit per tenant for expensive operations, implemented as a counter of in-flight requests that is decremented when each request finishes. For long-running work such as imports and exports, accept the request, queue it and return a job ID, so the tenant's burst becomes a queue rather than a wall of 429 responses. Practical Examples: Real-World Use Cases The inventory platform from the introduction switched to a token bucket with a burst size matched to its l
eb37d3daf573d12886b6fbca55194780c53ffdfd93a4c9311c3afbeffe0655d4Network indicators are visibly defanged. This page does not make them clickable or send them to another service.
No validated file hashes or network indicators are stored for this record.
This record contains metadata and attribution only. It does not host, download, unpack, render, or execute malware samples.
Sources represented on this page. Publication and observation dates describe the content; successful batch dates describe local collection. A recent batch does not certify complete coverage or current provider availability.
1 sources: 0 stale, 0 needing attention, 0 paused, 0 unverified.
Stale means older than twice the recorded collection interval, with a minimum of one hour; without an interval, the threshold is 24 hours. Cached content remains available while a feed is stale, paused, or unverified.