TMailr

← All writing

For developers

Rate limiting on the wrong axis is worse than none

31 July 2026 · 5 min read

The reflex is to limit per IP. It is easy, and it is usually the wrong axis. Offices, universities and mobile carriers put thousands of real people behind one address, and an attacker can rent a thousand addresses cheaply.

Limit the thing that causes harm

Ask what the abuse actually costs. If an action sends an email to somebody, the harm is measured per recipient, so limit per recipient. If it consumes storage, limit per account. The IP is a proxy for identity and a bad one.

Two details worth getting right

That second one is easy to get wrong and hard to notice, because it looks fine until something is actually under load.

More on for developers