On 2016-07-22 15:08, Gerard Petersen wrote:
> Dear Sorin,
>
> Thanks for the response, and good point on the 'behind kong' setup, to
> avoid the performance hit. Do you then run a container with just nginx
> and the specific rule set in there?
"There" = on the backend API? It depends on the backend, it could be an
apache server, not an nginx server. Then the container contains the web
server (nginx or apache), with mod_security, and the backend application
running on top of the web server.
If "there" is the proxy (kong), then we run a container with
nginx+mod_security+kong. We didn't use the container provided by
getkong.org, nor the debian package that contains all dependencies.
We've built our own nginx and kong packages from sources and then
created a container with our own packages. We did that only to assess
the response time degradation when enabling mod_security. I don't
remember the numbers (I _think_ it was something around 30% response
time degradation), so we decided to disable mod_security on the kong
proxy. We have not yet taken a decision about activating it on the
backend. We hope to have a smaller degradation because we could tune the
mod_security rule set to the backend application but I'm not holding my
breath.
Sorin