newb question: what's the actual use case of `ash_rate_limiter`?
Hello!
Sorry, maybe I'm writing a dumb question, but here I go: isn't rate limiting a
web
concern, meaning something that belongs to the "plug and phoenix" layer?
Therefore, what does ash have to do with it?
Why wouldn't I just use hammer
, plug it in, and call it a day?
context: I just deployed a site, and I see in the logs bursts of malicious activities, e.g.
So I searched for a rate-limiter and ash_rate_limiter
popped up.1 Reply
Ok, I'll answer myself on this one, as post-mortem, I'll write down what I've learned today:
1. rate limiting can to refer to a resource, not just an endpoint; AFAIK one could rate limit an ash resource, and having a ready-made ash plugin to do that is great
2. rate limiting can also be applied to endpoints, or maybe the whole web application. this can be a good initial and "general" strategy, to exclude obvious attacks or unintnended uses of the web app
3. the above problem (bots hitting wordpress endpoints searching for vulnerabilities) isn't solvable by rate limiting, as the server then answer anyways (429 instead of 404, possibly placing an overhead on the server)
I'll mark the above message as "solution" once someone confirms or denies my claims (: