You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Once the environment is set up with npm in your PATH,
you can build it with:
npm install && make
This will produce as_rate_limiting_debug.wasm and as_rate_limiting.wasm
files in build/.
Running
Make sure Kong configuration has the parameter wasm
set to on and the injected nginx directivenginx_wasm_shm_kong_wasm_rate_limiting_counters set
to some reasonable value, e.g. 12m. This directive
defines a shared key/value memory zone named kong_wasm_rate_limiting_counters
that's used by the filter to share request counters between workers.
The above configuration can be achieved using the environment variables:
The script demo.sh uses docker to start an upstream service and a Kong
instance configured to receive requests at https://localhost:8000/rated and to
allow only 3 requests per minute through the upstream service.
The docker resources created and initialized by the script can be destroyed by
invoking ./demo.sh stop.
About
AssemblyScript implementation of a prototype rate-limiting filter using proxy-wasm