RateLimit middleware

The RateLimit middleware ensures that services will receive a fair number of requests, and allows one to define what fair is.

Example of rate limiting middleware

middlewares:
  - name: rate-limit
    type: ratelimit #or rateLimit
    paths:
      - /*
    rule:
      unit: minute # or hour
      requestsPerUnit: 10

Example of route rate limiting middleware

version: 0.1.7
gateway:
  routes:
    - name: Example
      rateLimit: 60 # per minute

Example of global rate limiting middleware

version: 0.1.7
gateway:
  rateLimit: 60 # per minute
  routes:
    - name: Example