View Source Regulator.Limit.Gradient (Regulator v0.6.0)

Limiter based on the gradient of change. Based on Netflix's gradient2 algorithm. https://github.com/Netflix/concurrency-limits.

Options

  • :initial_limit - The initial limit when the regulator is installed (defaults to 20).
  • :min_limit - The minimum limit for the regulator (defaults to 5).
  • :max_limit - The maximum limit for the regulator (defaults to 200).
  • :smoothing - Determines how aggressively the concurrency limit can shrink if there is queueing. Numbers should be between 0.0 and 1.0. Higher numbers will cause the limit to shrink faster.
  • :rtt_tolerance - Specifies how much change in average round trip time will be allowed before reducing the concurrency limit. A value of 2.0 would mean that a 2x increase in rtt would be acceptable. Default 1.5.
  • :long_window_count - Defines the number of sample windows that will be considered in the long term moving average. Setting this value lower will cause the long term window to adjust more aggressively. Default 600.