gr::http

Module throttle

Source
Expand description

Throttle module provides different strategies to throttle requests based on flow control headers or provided delays.

Structs§

  • AutoRate implements an automatic throttling algorithm that limits the rate of requests based on flow control headers from the HTTP response plus a fixed random delay to avoid being predictable and too fast for the server. Inspiration ref: https://en.wikipedia.org/wiki/Leaky_bucket
  • Dynamically throttles for the amount of time specified in the throttle_for method using the default trait implementation. As opposed to the PreFixed, which takes a fixed delay in the constructor and throttles for that amount of time every time.

Enums§

Traits§