Build1 distinct publisher2 min readUpdated
A dev.to walkthrough shows the boundary bypass on a 100-per-minute cap. The weighted fix cuts the burst to 102, and charges an innocent front-loaded client 98 requests it has already spent.
The Engineer · Build desk
Compiled by The EngineerSomething wrong?How this is made
Run the attack in that post against the fix in the same post and you get a number it does not print. One second into the new window the weight is 59/60, so the previous minute's 100 hits are still carried as 98 [8]. The check refuses as soon as the estimate reaches the limit, which leaves room for exactly two more requests: 102 across the boundary instead of 200 [3]. That is the real case for the change, stated as arithmetic rather than as "Boundary Smoothness" [14], and the same arithmetic shows what is being bought, which is a bounded error rather than a correct count.
The error has a direction. The weight depends only on how far into the current window you are, never on where in the previous window the requests actually landed [8]. A client that made its 100 calls in the first second of 12:00 is still charged 98 of them at 12:01:01, and collects a 429 on its third request of a minute it has barely entered [12][3]. Fixed windows are permissive at the boundary and the weighted counter is punitive at the same boundary. For a login form, punitive is the right way round. The post names payment paths alongside auth as the motivation [5] without separating them, and those two do not want the same failure direction.
The complexity claims deserve the same literalism. Exact counting with a timestamp deque is O(N) space [6] and the two-integer version is O(1) [10], but O(1) is per key. The published class holds one record per client IP in an in-process Map, the key is read from req.ip or the x-forwarded-for header, and the code as shown never removes an entry [11]. Memory therefore tracks the number of distinct keys the endpoint has ever been shown, a quantity set by whoever is calling rather than by the operator.
Inside one process that is a housekeeping problem. Across several app instances it is an arithmetic one: each process keeps its own two counters [11], so a limit configured as 100 is enforced once per instance, and eight instances behind a load balancer admit 800 per minute before anything says no [4]. The 102 figure only holds once the counters are shared. Until then the weighted limiter is a fixed-window limiter with better manners, and the difference between 200 and 102 sits on a Redis deployment the post asserts rather than demonstrates [13].
Follow any of these and your For You feed starts watching them — no settings page required.
Ranked by verification strength, evidence, and original report placement.
Most simple rate limiters use a fixed-window counter: count incoming requests, and once the minute rolls over, reset the counter to zero.
The worked example is an endpoint allowing a maximum of 100 requests per minute, resetting every full minute on the clock (:00).
In the example, an attacker fires 100 requests at 12:00:59 (allowed), the clock resets the counter to 0 at 12:01:00, and another 100 requests at 12:01:01 are also allowed.
To the server code everything looks fine, but 200 requests hit the backend within a 2-second window.
Storing a timestamps array (a deque) per user and dropping timestamps older than 60 seconds is accurate but takes O(N) space, which the author says exhausts server memory at millions of requests.
The proposed alternative tracks only two integers per key: the request count of the previous window and the count of the current window.
Evidence-backed comparisons of source perspectives and observed adoption signals. Read the methodology
Which Builder, Operator, and Investor concerns the observed source mix emphasized—not a truth score.
Evidence, demonstrated adoption, hype gap, incentives, and confidence are assessed independently, each on its own current evidence. How these are measured.
Self-verifying arithmetic, no external validation
The core mechanics are checkable from the artifact itself: the fixed-window bypass timeline, the published weight/estimate formula, the complexity claims and the Express behaviour are all visible in the listing, and the derived 102-request and 8x-undercount figures follow from that same code. Against that, the cluster has one low-authority self-published source, no benchmark, no load test, no incident data, and no independent corroboration, and its two load-bearing operational claims (Redis scaling, severity in FinTech/auth) carry no supporting artifact at all.
No adoption signal in cluster
The single source is a tutorial. It contains no release, deployment, usage disclosure, benchmark, incident, download count, or named user of this limiter, and no third party is cited as running it. There is no basis on which to score adoption without inventing facts.
Overstated: 'enterprise-grade' framing on prototype code
The algorithm's value is real, but the packaging runs well ahead of what is shown. The post says the boundary attacker is 'blocked instantly' when its own math still admits 2 more requests; it bills the code as production-ready and cleanly Redis-scalable while shipping only a per-process Map that would enforce roughly 8x the stated limit across eight instances; it closes by calling the result 'enterprise-grade defense' despite no eviction, no trusted-proxy handling, no benchmark, and an unquantified FinTech/credential-stuffing severity claim. The gap is one of overclaiming on an otherwise honest technique, not fabrication.
Author-visibility incentive, no commercial interest shown
The observable incentive is reputational: a self-published developer post that frames existing middleware as 'naive' and its own hand-rolled math as turning that into 'enterprise-grade defense', which rewards a strong headline claim over caveats. No vendor sponsorship, product, paid tier, or affiliation is disclosed or visible anywhere in the source, so there is no evidence of commercial distortion; the score reflects promotional framing only.
Confident on the algorithm, weak on everything operational
Confidence is high for the parts grounded in the published code and arithmetic - the bypass, the formula, the complexity, the middleware behaviour, and the derived 102-request and per-instance-multiplication findings - because those can be rechecked line by line. It is low for the cluster as a whole: one publisher, one non-authoritative source, zero adoption evidence, and no independent test of the severity or Redis-scaling claims.
build
Two workers, one limit: a rate limiter's storage adapter is its outage policy1 distinct publisher
build
A unique index is not a duplicate check: the race inside a webhook idempotency middleware1 distinct publisher
build
Per-tenant Claude clients belong in the dependency graph, not in middleware1 distinct publisher
build
Allow-list the closed set, block-list the open one: 193 thin geo pages, one gate1 distinct publisher
Distinct publishers with included, body-backed reporting in this cluster.
dev.to
1 article · August 23, 2026