How do you test your rate limiting?

Generally curious how others test rate limit features in your apps is working as expected? I had the recent pleasure of one of my apps getting a nice spike in traffic and it brought to light some flaws in my rate limiting. I’ve since fixed them, but it brought to light I need to make sure to test in dev.

3 Likes

Uh oh, Replit newsletter broke your site!

1 Like

The newsletter certainly drove enough traffic to help bring to light that I need to test rate limiting more in the future :slight_smile:

It actually did bring up a bug that was in production that would cause the server to crash essentially when the rate limit was hit. Thankfully Agent was able to identify the bug fast with some error logs.

Ideally, would test in dev before prod in future, hence I’m curious what tools / resources people might use to do this.

I think it’d be good for us all to learn from!

2 Likes

This is what I found that could simulate this and debug. I’m almost where you are at as well, and with how complex my system is I need to make sure I can manage the same so I’ll report back if I find anything else.

1 Like

Thanks for sharing this. I saw this in searches earlier but haven’t tried it yet. Please share insights if you use/test with this.

Also, question maybe more for the Replit team, but is it within ToS to use some of the open source rate limiting testing tools out there? (e.g. Locust, k6) I could picture scenario of someone potentially creating a dedicated dev repl that does testing on their apps only in dev.

1 Like