Integrated: 1731: Improve RestRequestCache rate limiter

Erik Joelsson erikj at
Thu Jan 19 19:44:23 UTC 2023

On Tue, 3 Jan 2023 18:15:36 GMT, Erik Joelsson <erikj at> wrote:

> In the RestRequestCache, we are trying to limit non GET calls for a specific host and user to one call per second (and all calls, including GET, for a specific host and user, need to be serialized). This throttling is based on recommendations from GitHub ( The current implementation isn't really doing that however. Calls are serialized, but depending on timing, we can definitely send more than one non GET call per second, at least in bursts.
> This patch tries to rework this, using two locks. During high contention, it's possible that this new implementation will be less favorable to non GET calls than the current implementation, but I'm pretty sure we will at least adhere to the recommendation of performing at most one non-GET call per second. See bug for breakdown of locking order.

This pull request has now been integrated.

Changeset: 4a6330c1
Author:    Erik Joelsson <erikj at>
Stats:     32 lines in 1 file changed: 12 ins; 10 del; 10 mod

1731: Improve RestRequestCache rate limiter

Reviewed-by: zsong, ihse



More information about the skara-dev mailing list