Skip to content

Latest commit

 

History

History
24 lines (19 loc) · 915 Bytes

README.md

File metadata and controls

24 lines (19 loc) · 915 Bytes

Rate Limiting

snet-daemon uses the Token Bucket Algorithm and the rate library.

###rate limiting configuration

  • rate_limit_per_minute (optional; default: Infinity) Defines the the rate r at which the bucket is filled with tokesn per minute. By default this parameter is set to infinity, effectively having no rate limiting.

  • burst_size (optional; default: Infinity) - Defines a "token bucket" of size b , with a maximum burst size of b events. The Burst size is ignored when the rate limit is infinity. Please note that the Burst size is ignored when the rate limit is infinity.

Configuration in JSON format

The below is an example on how rate limiting could be defined

  {
    "burst_size": 80000,
    "rate_limit_per_minute": 50000
  }