Anders Sveen
12/19/2023, 1:03 PMregister(rateLimitGeneralId) {
rateLimiter(limit = 1000, refillPeriod = 60.seconds)
requestKey { call -> call.userIdFromJwt() }
requestWeight { _, key -> if (key == PARTNER_NOT_FOUND) 0 else 1 }
}
But when I enable it response times skyrockets. It seems like it is using a lot more memory when it is enabled, but it is hard to diagnose as it is really only an issue in production.
Anyone experienced something similar? Any pointers as what to look into? I have double checked that we are not getting a lot of weird keys. I am pretty sure we will have 20-30 keys at any time. 🙂Aleksei Tirman [JB]
01/03/2024, 8:15 AM