Skip to content

Instantly share code, notes, and snippets.

@Pchelolo
Created June 9, 2020 20:07
Show Gist options
  • Save Pchelolo/1dc514c4e23ed7b557ddaf392d67dc9b to your computer and use it in GitHub Desktop.
Save Pchelolo/1dc514c4e23ed7b557ddaf392d67dc9b to your computer and use it in GitHub Desktop.
- MW stores the config for user classes -> rate limit + attributes
- The lua filter parses them out from the JWT: now lua filter has a rate number
- OPTIONAL: we can set the overrides as https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/lua_filter#metadata
- applies the proper metadata -> we now have the number = my limit is 1000 req/s
now... descriptors...
Overrides as hits_added. Can't be < 0 :(
- hits_addend=100.000 / limit ???
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment