temporal
temporal copied to clipboard
Per task queue rate limiter only take effect after 1m.
Set per task queue rate limit to 1, observe the RPS stay at around 1, then reboot matching and you will see a big spike of throughput for the first minute, then it fall to 1 again. This is due to the rate limiter only update its rate every 1m and is initialized with a big limit value. https://github.com/temporalio/temporal/blob/c2a3a2bdfb6377a633928203ffe577281da216d1/service/matching/matcher.go#L78
We should allow the rate limiter to update its rate for the first time without that 1m delay.
https://github.com/temporalio/temporal/pull/3335