#

rate-limiting

3 posts

Charge the quota when you deliver value, not when you accept the request

A visitor gets two free runs. Two dead links later they have used both and received nothing. Where you decrement a quota is a product decision in disguise.

Sep 02, 20265 min readRails
A vending machine coin slot with a coin halfway in and the delivery tray visibly empty.

Our rate limits were bypassed by a trailing slash

Five tuned Rack::Attack throttles, all matching the path exactly. Rails normalised the path after they ran, so a dot-json or a trailing slash bypassed every one.

Sep 01, 20265 min readRails
A turnstile in an empty station with an open gap in the railing right beside it.

Layered bot defense for a public form: honeypot, Turnstile, email verification, and the pieces between

A public, unauthenticated form that writes to the database and sends email is a bot's favorite denial-of-service target. No single control is enough. The point is layering honeypot, Turnstile, rate limiting, and email verification so one layer failing doesn't sink the rest.

Jul 30, 202617 min readrate-limiting
A medieval castle viewed from outside its outer wall. Multiple defensive layers visible in one frame.