smockron
smockron copied to clipboard
Gatekeeper-side proactive throttling
It would be possible for a gatekeeper to run part or all of the same throttling logic as the master, on the assumption that it is the only gatekeeper that exists.
This could help protect against the effects of gatekeeper-master round-trip latency when a client sends a very large request volume.
One partial solution that would be easy to implement would be: when a gatekeeper receives a request from a client that it is already delaying, it can add interval
to the delayTS
without the server's help, since it knows that the client is already throttled at the present time, and that there has been at least one additional request (the one it just handled). Since gatekeepers already keep a delayTS
per identifier, the only thing it needs to know is the interval
for a given domain, which the master could publish in each DELAY_UNTIL
message.