metakgp / naarad

Self-hosted ntfy.sh server for metakgp
https://naarad.metakgp.org
GNU Affero General Public License v3.0
11 stars 3 forks source link

Too many requests (429) error for naarad-api backend #25

Closed proffapt closed 1 week ago

BAGUVIX456 commented 1 month ago

Shall I work on this?

proffapt commented 1 month ago

go ahead, and keep me updated by yourself.

proffapt commented 1 month ago

@BAGUVIX456 updates?

BAGUVIX456 commented 1 month ago

Working on it, still not able to pinpoint what exactly is causing the error

proffapt commented 1 month ago

The rate limiting is occurring on /request endpoint not on all of the naarad-api backend. That is the 429 is coming from naarad backend not our backend.

proffapt commented 1 month ago

https://github.com/metakgp/naarad/commit/9cc6c19b28741dddae7c611c3de10c2c61844134

Should fix it, let's check in coming 3-4 days how it performs.

proffapt commented 1 month ago

Update: Didn't fix.

proffapt commented 1 week ago

So the probable reason behind this behaviour is following:

image

Observe that both the usernames have the same public ip. And the limits are applied to these ip addresses. This is because KGP has handful of public ips, resulting in rate-limiting affecting not just a single user but a collection of users.

So, as fix, following is implemented until a better fix is ideated: