Search code examples
filterservlet-filtersnetflixnetflix-zuul

What does Netflix Zuul do more than regular Servlet Filters?


I understand Netflix Zuul acts as Filters that can route requests (especially in an distributed API based environment).

  1. What special feature does Zuul bring compared to regular Servlet Filters or Interceptors in Struts2 kind of frameworks ?

  2. Are Zuul filters made of Servlet Fitlers themselves ?

Note: Few articles about Zuul talks about dynamic routing, load shedding, insights, health analysis etc that can be done in Zuul. My question is that, can't i do the same operations in my traditional filters or Struts2 Interceptors..etc.. ? What difference does Zuul brings in ?


Solution

    1. Zuul filters, written in Groovy, can be dynamically created and injected into Zuul.
    2. The filter interfaces are designed to be created as a pipeline within a request and response, making it very easy to set filter priorities, add, remove, or change a request as it passes through the filter chain, and do interesting kind of routing.