Questions tagged [varnish]

Varnish is a high-performance reverse proxy and load-balancer package for Linux/Unix systems.

Varnish is primarily a caching reverse proxy, but also exhibits load-balancing and backend checking mechanisms and is very widely used on high traffic websites.

Varnish was designed from the ground to be a high performance reverse caching proxy and to not compete with the operating system on managing resources like memory. Most recent versions of Varnish support storing cache on memory or disk, and serving old content in case of backend fail (saint mode), among other features.

Varnish is written by Poul-Henning Kamp (PHK), and his Architect Notes are available about varnish design. PHK is also a well known FreeBSD kernel developer and mantainer.

937 questions
5
votes
2 answers

Varnish 503 error after exactly 60 seconds... how to change this timeout value?

I'm running Varnish over Apache on a Drupal site. I have a PHP script that executes on a certain path of my site, and takes a really long time... like 60 - 120 seconds. When trying to access that page, Varnish always gives me 503 guru meditation…
Jordan Magnuson
  • 187
  • 1
  • 2
  • 9
5
votes
2 answers

Need HAproxy + Varnish + nginx setup suggestions

Currently, I have two load balancers running HAProxy, which forward requests to backends, each of which run Varnish cache in front of nginx. I thought this would distribute most the bandwidth across the backend servers, but my load balancers appear…
Lin
  • 2,909
  • 7
  • 27
  • 25
5
votes
1 answer

Varnish fails to start. Running VCC-compiler failed without a compiler error

EDIT: System ran out of disk space so the compiler couldnt create the files. The output of varnishd doesnt tell you this. Always check your disk quota if you get weird errors with no obvious reason :) will answer myself after 6 hours. I am running…
user2040627
  • 53
  • 1
  • 4
5
votes
1 answer

How to increase Varnish throughput?

Sometimes on a busy Pressflow site I notice a timeout for unauthenticated users while the server's port is far from being saturated, there is plenty of unused memory and the server load is very low. In addition to that, the bandwidth usage of the…
alfish
  • 3,127
  • 15
  • 47
  • 71
5
votes
2 answers

Varnish configuration to only cache for non-logged in users

I have a Ruby on Rails application fronted by varnish+nginx. As most of the sites content is static unless you are a logged in user, I want to cache the site heavily with varnish when a user is logged out but only to cache static assets when they…
davidsmalley
  • 457
  • 1
  • 6
  • 14
5
votes
3 answers

Varnish config rules to cache large MP3 and PDF files?

Our site has a number of large PDF and MP3 files which we would like to cache in Varnish as static files. Currently we don't do much special - simply remove the cookies in vcl_recv and set resetp.ttl = 100w; in vcl_fetch. The problem seems to be…
Nic Cottrell
  • 1,302
  • 16
  • 32
5
votes
2 answers

Load balance HTTP based on a percentage of traffic or requests?

I want to have v1 of my application in one pool and version v1.1 in another pool and then slowly ramp up the traffic going to pool two and reduce it to pool one. Can anyone show some concrete examples of doing this with HA Proxy, Varnish, Nginx or…
markba
  • 85
  • 1
  • 6
5
votes
1 answer

Best way to deploy my node.js app on a Varnish/Nginx server

I am about to deploy a brand new node.js application, and I need some help setting this up. The way my setup is right now is as follows. I have Varnish running on external_ip:80 I have Nginx behind running on internal_ip:80 Both are listening on…
Saif Bechan
  • 10,960
  • 10
  • 42
  • 63
5
votes
1 answer

nginx with Memcache Vs Varnish

I was wondering if anyone has any comments / benchmarks / suggestions on Varnish Vs Memcache when used to serve content (usually 2-5kb JS file depending on the parameters in request; thousands of diff files are possible) Currently we are using nginx…
Sparsh Gupta
  • 1,127
  • 7
  • 21
  • 31
5
votes
2 answers

Optimize php-fpm and varnish for a powerful server

My setup is Intel® Core™ i7-2600 and RAM 16 GB DDR3 RAM varnish+nginx+php-fpm+apc for a not very heavy WordPress blog with W3 Total Cache and CDN My problem is that after 55 hits per second according to blitz.io varnish starts giving out timeouts.…
Jim
  • 410
  • 4
  • 14
5
votes
1 answer

Use Cherokee Instead of nginx in Front of Varnish to Get HTTP 1.1 Optimizations?

We have been running nginx -> uWSGI, and now we are evaluating putting Varnish as a caching layer between nginx and uWSGI (similar to http://www.heroku.com/how/architecture). But, nginx only supports HTTP 1.0 on the back so it will have to create…
espeed
  • 159
  • 5
5
votes
1 answer

Getting correct SERVER_PORT to php-fpm through nginx and varnish

The goal is to get PHP aware of the correct web-facing server_port. The setup is: nginx on port 443 reverse proxying to varnish on port 80 reverse proxying to nginx on port 8008 and running php-fpm as a fastcgi. hitting 80 or 443 both work fine…
MDrollette
  • 325
  • 3
  • 12
5
votes
4 answers

Running PHPmyAdmin on Nginx, port 8080 passed to varnish not working well!

I installed Nginx, Varnish and PHP-fpm. Then I installed PHPmyAdmin and made a virtual host for it: server{ listen 8080; server_name phpmyadmin.Domain.com; access_log /var/log/phpmyadmin.access_log; error_log…
amrnt
  • 359
  • 1
  • 3
  • 9
5
votes
2 answers

Adding a reverse proxy - nginx or varnish

We currently serve most of our Rails and LAMP apps over Apache and Apache passenger, but we're considering adding Nginx or Varnish as a reverse proxy to reduce the load on our servers somewhat. I'm aware that you can use Varnish and Nginx together,…
Chris Adams
  • 709
  • 3
  • 11
  • 18
5
votes
1 answer

Serving application HTTP/5xx error pages via Varnish

I an working on running a few Rails applications through Varnish to provide better caching support which will hopefully be more flexible then the build in page-cache options in rails. One issue I have stumbled upon is that when a HTTP/50x error is…
Matthew Savage
  • 528
  • 1
  • 7
  • 18