Rate Limiting library
Another rate-limiting library https://github.com/whitered/ratekeeper
case Ratekeeper.register("myapi.org", 10_000) do
nil -> raise "Rate limits exceeded, request not allowed in next 10 seconds"
delay ->
:timer.sleep(delay)
MyApi.do_request()
end
Read next A dive into database multi-tenancy in Elixir with Ecto