Currently when ntfy rate limits a client, it seems to just send the 429 status code back, but doesn't advise as to when the rate limit would be lifted. This means that clients can't dynamically pause sending notifications until the rate limit resets, which leads to IP bans.
By advertising when the rate limits reset, we could delay all other notification until after the rate limit resets. I tried to look at both the documentation and code to see if you currently have any code that advertises to the client information about the rate limit, and couldn't find any.
:bulb: Idea
Currently when ntfy rate limits a client, it seems to just send the 429 status code back, but doesn't advise as to when the rate limit would be lifted. This means that clients can't dynamically pause sending notifications until the rate limit resets, which leads to IP bans.
There is a standards track IETF proposal for RateLimit headers, which could make sense to use: https://www.ietf.org/archive/id/draft-ietf-httpapi-ratelimit-headers-07.html
This currently affects Mastodon: https://github.com/mastodon/mastodon/issues/26078
By advertising when the rate limits reset, we could delay all other notification until after the rate limit resets. I tried to look at both the documentation and code to see if you currently have any code that advertises to the client information about the rate limit, and couldn't find any.
:computer: Target components