10 comments

  • nik736 5 days ago

    Rails 8 introduced built in rate limiting, smilar to what you described. Since it's built in already I have no use for your service, but good luck!

    • 0megion 5 days ago

      It's already too late if requests are hitting your service. What happens when a customer sends x100 traffic all of a sudden, your Rails backend needs to scale or crash to handle the rate limiting.

      • nik736 5 days ago

        For me it's not a big deal, my app autoscales and rate limit details are stored in Redis, so it's super fast. For x100 the traffic it wouldn't even need to scale since it's simply hitting Redis.

        • 0megion 4 days ago

          Interesting, but still your Rail app needs to apply the rate limit logic working with Redis, maybe your DB will be protected, but you will still receive the traffic through your network, meaning more ingress cost, along with CPU to process all the incoming requests.

          • nik736 4 days ago

            Ingress is free with most providers. Yes, of course it adds a bit pressure on the cpu, but yours would add latency, might add peering issues, additional costs, etc. and I have no control.

  • galaxy_gas 5 days ago

    I can't see myself ever using this unless self hosted as library with no phonehome . remote internet API call every time when I am getting millions of rps is intolerable

    • 0megion 5 days ago

      That is fair. Maybe Proxy mode would be a way to go in this case? Instead of calling another API, you can pass through your requests, and only a small amount can reach your origin.

      • galaxy_gas 5 days ago

        CF Worker its pay per req isnt it ? This seems impossibly expensive to proxy

        • 0megion 5 days ago

          Correct, pricing would be based on the traffic volume.

  • nidssc 5 days ago

    [dead]