The ratelimiter middleware restricts the frequency of calls to a rate with a maximum burst.
The following table describes the keys on the configuration object for the ratelimiter middleware.
|Integer||The maximum number of requests allowed in a burst|
|Duration||The period at which a call token is created|
The following applies a ratelimiter to prevent calling the remote endpoint more than twice per second.
source: fnrun.source/http middleware: - fnrun.middleware/ratelimiter: every: 500ms fn: fnrun.fn/http: targetURL: http://example.com/some-endpoint