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
3
votes
4 answers

Varnish, hide port number

My set up is as follows: OS: CentOS 6.2 running on an OpenVZ virtual machine. Web server: Nginx listening on port 8080 Reverse proxy: Varnish listening on port 80 The problem is that Varnish redirects my requests to port 8080 and this appears in the…
George Reith
  • 673
  • 2
  • 12
  • 22
3
votes
3 answers

Varnish client.ip says 127.0.0.1

So I have a setup like Nginx -> varnish -> apache2 If I get a request with a static file it is sent through nginx to varnish and back to nginx again since its a lot faster than letting apache2 server it. My problem is that when I do a sub vcl_fetch…
Ronnie Jespersen
  • 221
  • 5
  • 14
3
votes
1 answer

503 with Varnish to HAproxy

We host multiple apps, on different app servers. What we have is HAProxy -> App Servers The App servers can be anything from PHP on Apache to Java app in glassfish. So we use haproxy to expose 1 IP and 1 port to the internet and then also…
daemonza
  • 131
  • 1
  • 3
3
votes
1 answer

Pass PURGE requests to varnish via nginx

How can I configure nginx to pass a PURGE request from localhost to the Varnish backend? Currently, the script causes this line to appear in the nginx logs: 127.0.0.1 - - [23/Apr/2012:20:12:31 -0500] "PURGE /blog HTTP/1.1" 405 173 "-" "-" Is there…
Mahmoud Al-Qudsi
  • 559
  • 1
  • 6
  • 23
3
votes
3 answers

How to filter Varnish logs based on XID?

I'm running into infrequent 503 errors which appear hard to pinpoint. Varnishlog is driving me mad, since I can't seem to get the information I want out of it. I'd like to see both the client- and backend-communications as seen by Varnish. I thought…
Martijn Heemels
  • 7,728
  • 7
  • 40
  • 64
3
votes
1 answer

Varnish on Debian - libvarnish.so.1 not found

I'm trying to install Varnish on Debian 6.0.3 and am getting the following error when I try to start the server /usr/sbin/varnishd: error while loading shared libraries: libvarnish.so.1: cannot open shared object file: No such file or…
Jan Henckens
  • 512
  • 2
  • 9
  • 20
3
votes
2 answers

Configure php5-fpm for many concurrent users

EDIT: Added some configs and a clarification on how many is "many", as requested by anthonysomerset. EDIT 2: Added fastcgi_cache to nginx config, as suggested by SleighBoy. I run a server for a friend's site that now and then gets big spikes in…
jgabor
  • 43
  • 1
  • 7
3
votes
1 answer

varnishd: command not found

New machine running CentOS 5.6, httpd & mysql installed and operational. I've installed Varnish through yum without any error but I'm unable to run the varnished For example, if I want to run the following command as seen on the…
Jan Henckens
  • 512
  • 2
  • 9
  • 20
3
votes
1 answer

Caching + webserver on the same machine?

I'm preparing the move of a live website from a shared server to a seperate server running just that one site. Right now we're getting lots of traffic and Apache is having a hard time keeping up. One of the things I'm considering for the new server…
Jan Henckens
  • 512
  • 2
  • 9
  • 20
3
votes
2 answers

Varnish, Nginx, Apache, APC, Meteor, Cpanel & Wordpress On A Single Server, Any Good?

Yes, I have read many close questions, but I needed a specific answer and hence this question. First, these are my new server specifications: Linux Server (CentOS), Intel Xeon 3470 Quad Core (2.93GHz x 4) processor, 4 GB DDR3 Memory, 1TB Hard Disk…
user88753
3
votes
3 answers

How do you remove varnish?

I have a site that is currently using Varnish for caching HTTP requests, however for several reasons it is doing more harm than good. My problem is that I can't find a way to stop all http requests going through it. If I stop the varnishd service…
oarevalo
  • 161
  • 1
  • 1
  • 6
3
votes
1 answer

Where does Varnish usually go in a Rails web stack?

I have a production Rails application deployed on Unicorn with nginx in front for static file serving. I now need some features of Varnish and I'm wondering how to introduce it. Some people put Varnish in front while others put nginx in front. I…
wormcontrol
  • 31
  • 1
  • 2
3
votes
3 answers

Load balancing: Nginx, Varnish and HTTP sessions

I have to setup a load balancing system. At the moment I have two machines running Nginx 0.8.52, PHP-FPM (on unix socket) and an application based on PHP Symfony 1.4.11. On a third machine, I have to choose a which balancer to install. I've already…
3
votes
1 answer

Configuring HTTPD behind Varnish on a 512mb VPS

I am hosting a website for a client on a dedicated VPS that has 512mb of RAM. Within the last 2 weeks, it has hosed up twice due to 0% free memory (or free swap). The site is pretty database intensive, as it's running Drupal with 60+ modules. It…
David W
  • 3,453
  • 5
  • 36
  • 62
3
votes
1 answer

Setup a proxy (Not reverse proxy) using Varnish/Squid

I need to setup a proxy server where we can request remote urls and get them served locally. Basically what I need is mysever:8000/varnish/serverfault.com get me serverfault.com served from my local varnish or myserver:8080/squid/serverfault.com get…
shabda
  • 300
  • 1
  • 4
  • 10