-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Filters
Filters are are the core of Zuul's functionality. They are responsible for the business logic of the application and can perform a variety of tasks.
- Type: most often defines the stage during the routing flow when the Filter will be applied (although it can be any custom string)
- Async: define if the filter is sync or async, generally meaning do you need to make an external call or just doing work on-box
- Execution Order: applied within the Type, defines the order of execution across multiple Filters
- Criteria: the conditions required in order for the Filter to be executed
- Action: the action to be executed if the Criteria is met
Zuul provides a framework to dynamically read, compile, and run these Filters. Filters do not communicate with each other directly - instead they share state through a RequestContext which is unique to each request.
Filters are currently written in Groovy, although Zuul supports any JVM-based language. The source code for each Filter is written to a specified set of directories on the Zuul server that are periodically polled for changes. Updated filters are read from disk, dynamically compiled into the running server, and are invoked by Zuul for each subsequent request.
A Netflix Original Production
Tech Blog | Twitter @NetflixOSS | Jobs
-
Zuul 3.x
-
Zuul 2.x
-
Zuul 1.x