Fix rate limit accuracy

Batching multiple updates to the leaky bucket at a fixed interval
improves the accuracy of the rate limiter. Previously the rate would
drop substantially over the course of the sync operation.
This commit is contained in:
Tim Rae
2024-06-08 12:47:25 +02:00
parent ecc642ba7d
commit bb0f3cffd0
2 changed files with 11 additions and 4 deletions

View File

@@ -16,4 +16,4 @@ spotify:
# increasing these parameters should increase the search speed, while decreasing reduces likelihood of 429 errors
max_concurrency: 10 # max concurrent connections at any given time
rate_limit: 12 # max sustained connections per second
rate_limit: 10 # max sustained connections per second