A shoutbox that does not become a spam channel
Rate limited, length capped, link stripped, moderatable, and cheap to poll. The five constraints that keep a chat box usable.
4 entries
Rate limited, length capped, link stripped, moderatable, and cheap to poll. The five constraints that keep a chat box usable.
One request per interval for the whole site, an atomic cache write, and a stale copy served rather than nothing when the feed is down.
No Redis, no extension, no cron. One table and one function that caps any action per key within any window, and fails open so an outage never locks the site.
Every per-IP limit you have is only as good as this function. Reading X-Forwarded-For unconditionally hands attackers a free reset on all of them.