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
11
votes
2 answers

varnish daemon not listening on configured port

I'm trying to install varnish on ubuntu 16.04, I read several article none are working. From what I read, since ubuntu 15.04, the way of configuring varnish has changed (because of systemd). Now on I've got a real mess wich don't work :…
Bruno
  • 213
  • 1
  • 2
  • 7
11
votes
2 answers

How to install a Varnish module on Ubuntu

I want to install an additional module for Varnish Cache, the Shield module. How can I do that? I installed Varnish 3.0 from the Ubuntu repositories. How do I get the Varnish source which the module needs to compile? Do I need to compile Varnish…
Tobe
  • 151
  • 2
  • 6
11
votes
4 answers

Varnish "FetchError no backend connection" error

Varnishlog: 0 CLI - Rd ping 0 CLI - Wr 200 19 PONG 1340829925 1.0 12 SessionOpen c 79.124.74.11 3063 :80 12 SessionClose c EOF 12 StatSess c 79.124.74.11 3063 0 1 0 0 0 0 0 0 0 CLI - Rd ping 0…
anon-123
  • 119
  • 1
  • 1
  • 4
11
votes
7 answers

How can I balance incoming web traffic amongst N apache servers?

I am looking to use something like Heartbeat/Squid/Varnish/etc to balance the amount of incoming traffic amongst the internal apache instances. This would have to be software and not hardware as all my stuff is run on VPS. I don't have a lot of…
Jackie
11
votes
5 answers

Does Varnish require much RAM?

Other than virtual memory, How about RAM usage for Varnish? Is it much RAM needed?
guyonan
10
votes
4 answers

Why cache static files with Varnish, why not pass

I have a system runnning nginx / php-fpm / varnish / wordpress and amazon s3. Now I have looked at a lot of configuration files while setting up the system, and in all of them I found something like this: /* If the request is for pictures,…
Saif Bechan
  • 10,960
  • 10
  • 42
  • 63
10
votes
7 answers

Varnish -> Nginx -> Apache a good idea?

I'm thinking about the architecture for a new Webserver. Would having Varnish as a cache in front of Nginx as a reverse-proxy and serving static files in front of apache for all heavy lifting be a good idea? I'm going to run php and ruby on rails…
Zoran Zaric
  • 283
  • 3
  • 8
9
votes
1 answer

What are the commands to get top MISSES and HITS from Varnish 4?

For work I am using Varnish 3 on CentOS, but at home I am using Varnish 4 on Ubuntu 14.04. At work I use these commands: Top hits: varnishtop -i rxurl Top Misses: varnishtop -i txurl But for some reason they do not work on Varnish 4 Ubuntu. What…
jnbdz
  • 927
  • 5
  • 24
  • 46
9
votes
2 answers

How do I set a varnish response TTL dynamically?

my php script is sending a header X_Cache_ttl: 1h and in my varnish config file I have sub vcl_fetch { if(beresp.http.X-Cache-ttl){ set beresp.ttl = beresp.http.X-Cache-ttl; } } but the line with the set command is causing…
DiverseAndRemote.com
  • 2,091
  • 3
  • 16
  • 16
9
votes
1 answer

How does Varnish deal with running out of storage?

I am using Varnish 3.0.3 (the latest as of this writing) with more or less the default install, using the following for storage: # # Cache file location VARNISH_STORAGE_FILE=/var/lib/varnish/varnish_storage.bin # # # Cache file size: in bytes,…
user174548
  • 91
  • 1
  • 3
9
votes
3 answers

AWS ELB as backend for Varnish Accelerator

I am working on a large deployment on AWS that has high uptime requirements and variable loads throughout the day. Obviously, this is the perfect use case for ELB (Elastic Load Balancer) and autoscaling. However, we also rely on varnish for caching…
addisonj
  • 318
  • 2
  • 7
9
votes
2 answers

How to Read a Varnish Histogram?

How is a varnishhist histogram/graph read? I understand that the x-axis is a log scale. Specifically: I see 9 "|"s or cache hits occur around y=1e-4, what does each "|" refer to? Page? File? I see fewer hits to the left of these 9 "|"s and some to…
KM.
  • 1,786
  • 2
  • 18
  • 31
8
votes
3 answers

Does it makes sense from a security perspective to remove the Server HTTP header?

I'm using Varnish and I'm not quite sure if I should also remove the Server: nginx HTTP header. Why do someone needs to know that I'm using NGINX? Is it ok to remove this HTTP header from the response or is it needed somewhere? From a security…
manifestor
  • 6,079
  • 7
  • 27
  • 39
8
votes
3 answers

Getting 503 error from Varnish but varnishlog doesn't tell much

Running Varnish 4 and I'm occasionally getting 503 errors which I can't put my finger in. I've tried curling the backend directly and it's returning a response everytime so it doesn't look like the issue is there. Below is entry from my varnishlog…
Axsuul
  • 101
  • 1
  • 3
  • 12
8
votes
3 answers

Let varnish send old data from cache while it's fetching a new one?

I'm caching dynamically generated pages (PHP-FPM, NGINX) and have varnish in front of them, this works very well. However, once the cache timeout is reached, I see this: new client requests page varnish recognizes the cache timeout client…
mark
  • 1,516
  • 5
  • 21
  • 33
1
2
3
62 63