PROJET AUTOBLOG


Shaarli - Les discussions de Shaarli

Archivé

Site original : Shaarli - Les discussions de Shaarli du 23/07/2013

⇐ retour index

What is the fundamental difference between varnish and squid caching architectures? - Quora

jeudi 25 septembre 2014 à 16:32
Httqm, le 25/09/2014 à 16:32
Squid :
+ built-in SSL support
+ initially dedicated to be a forward proxy
- configuration lnaguage not as flexible as Varnish's
- performance and scalability (single process)
= cache on HDD


Varnish :
+ initially dedicated to be a reverse proxy
+ flexibility of configuration language
+ better performance and scalability than Squid (threaded)
+ flexible cache invalidation capabilities
+ modules / extensions
- no built-in SSL support
= cache on RAM

http://www.webhostingtalk.com/showthread.php?s=07ec1abdea2e9cbeaac980d7a2b9b15b&t=1055547

for static content :
Varnish + Nginx
or store static resources on SSD and serve them with Nginx (as web server)

for dynamic content :
Varnish (cache) + Apache
Nginx (reverse proxy serving all static requests) + Apache (for dynamic content requests)

NB :
Nginx + php-fpm is faster than Nginx + Apache but you lose all of the apache specific features and modules. Probably the only "deal breaker module" is mod_rewrite, which doesn't exist in nginx.
Nginx can serve static content just as fast as Varnish in most cases, in high load environments when performance of the two will actually matter the overhead of layering them out will cost more then direct requests. BUT : the overhead is minimal. Varnish has a better method of caching and content distribution than Nginx will ever have. Both serve their roles and depend on what you're trying to do. Do not compare a system developed solely for caching vs a system built for content origination. ( ==> do a benchmark !)
(Permalink)