@custer and @Everyone,
The question
We'd like to discuss this with you guys -- which caching solution you'd prefer and why?
is essentially not a valid question, when comparing Nginx and Varnish.
Simply stated, Nginx and Varnish are two solutions for entirely different goals: Nginx is a (reverse or forward proxy OR a light-weight, fast web server), while Varnish is primarily intended to provide a caching mechanism with some analogy to a proxy.
The combination of Nginx and Varnish is a bad combination.
The use of Varnish alone is really not desirable, since there are better alternatives, in the form of Memcached or Redis Cache.
Even though Nginx natively supports
a) disk based caching, AND
b) memory based caching, via Memcached,
it still does not imply that we can "simply compare" Nginx with Varnish and just make a choice.
In essence, one has to compare Varnish with all other caching mechanisms available.
I am pretty sure that all benchmarking tests will lead to the conclusion that a website on a properly configured web server will do best with Redis Cache.
However, as far as I know, there is not yet a rock-solid Redis module for Nginx, but that is "work in progress" and, moreover, simple workarounds exist.
Combining all of the above mentioned information and the power of Nginx directives (and possibilities to use memory based caching mechanisms with Nginx), the following applies:
1) the essence of Nginx is that its (relatively unlimited) power is underused in Plesk (and by most people),
2) the essence of Varnish is that it is "just another form of caching", that does not play well in any Plesk based setup,
3) the essence of caching is that most people are translating the "need for speed" to a rather (mostly unnecessary) complex setup,
and so on.
The conclusion should be that the current question will result in answers that are not really related to the question of "what is the most performant caching mechanism".
The questions should rather be:
- "How can the Nginx directives be used to make use of a performant caching mechanism?"
- "Should some caching related Nginx directives be part of the default Nginx configuration in Plesk?"
- "In which cases should one actually use caching mechanisms?"
- "In which cases should one apply caching on the side of the web server or on the side of the proxy?"
- "In which cases should one resort to other caching mechanisms, such as Varnish?"
My personal conclusion is that Varnish should never be part of the default Plesk stack, since it is pretty sure to cause many issues, for many (evident) reasons.
My personal opinion is that the factual underusage of Nginx in the current Plesk stack should be investigated, since that would prevent questions like the current one.
Regards......