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

Varnish running out of open ports, lots of SYN_SENT connections

Recently we've been experiencing issues with our Varnish (3x) -> Apache (3x) setup, resulting in a huge spike in SYN_SENT connections. The spike itself is due to the amount of new traffic hitting the site (not a DDOS of any kind), and it seems like…
user150997
  • 81
  • 1
  • 2
8
votes
2 answers

Force request to miss cache but still store the response

I have a slow web app that I've placed Varnish in front of. All of the pages are static (they don't vary for a different user), but they need to be updated every 5 minutes so they contain recent data. I have a simple script (wget --mirror) that…
Tom Marthenal
  • 2,116
  • 7
  • 25
  • 37
8
votes
5 answers

Which reverse-proxies support HTTP/1.1 ETag and If-None-Match headers?

I'm developing a caching system for an ecommerce platform that will use a reverse proxy for caching. I plan to handle invalidation by using proper HTTP/1.1 headers. That is, I will set an ETag on first generation of the content and cache that ETag…
ColinM
  • 701
  • 8
  • 19
8
votes
2 answers

Is it possible to run varnish with both memory and disk storage?

I'm interested in maximizing cache hits and efficiency for a slow-changing site. The virtual host doesn't have a huge amount of RAM, but I'd like to use what's available for varnish, but to fall back to disk cache if there isn't enough memory. Is…
user67641
  • 1,292
  • 2
  • 14
  • 18
8
votes
3 answers

Use Varnish Cache only on-disk

The situation is: I' m building a PHP application and need http caching. Varnish is great and lots of people tell me that Varnish stores the cached data in RAM. I want it to cache on hard disk. Is there any way to store the Varnish cache-data on…
Great Kuma
7
votes
6 answers

How many reverse proxies (nginx, haproxy) is too many?

I'm setting up a HA (high availability) cluster using nginx, haproxy & apache. I've been reading great things about nginx and haproxy. People tend to choose one or the other but I like both. Haproxy is more flexible for load balancing than nginx's…
Alysum
7
votes
2 answers

Set default TTL in Varnish 4.0?

I am new to Varnish, and I am running v4.0 on Debian Wheezy. I would like to set a default TTL across my cache of 4 weeks (very static content). From reading the docs I think the answer is to set a default_ttl option somewhere in my VCL file. I…
Richard
  • 263
  • 2
  • 5
  • 11
7
votes
2 answers

Change varnish 4 503 error

How can i change varnish 503 error? How can i customize it ? i'm using varnish v 4 it's now work sub vcl_synth { set resp.http.Content-Type = "text/html; charset=utf-8"; set resp.http.Retry-After = "5"; synthetic( {"
Ali Hasanzade
  • 73
  • 1
  • 1
  • 4
7
votes
3 answers

Configuring Varnish to rewrite Expires/Cache-Control headers for client-side caching

How do I configure Varnish so that all responses to requests matching say "*.css" gets cached in the client's browser for 30 days? What I'm trying to achieve is making Varnish set the correct "Expires:" and/or "Cache-Control" settings so that all…
knorv
  • 1,799
  • 6
  • 19
  • 29
7
votes
2 answers

reverse proxy that caches post requests

I understand that varnish caches "GET" and "HEAD" requests by default. My backend servers fail when I do a get request that is too long, so I made them respond to POST instead of GET. This works great, but I need a reverse proxy which can be…
nurettin
  • 378
  • 2
  • 10
7
votes
2 answers

nginx proxy_cache: limit parallel requests to a backend

I am using nginx as a reverse proxy to my backend(s). Configuration is pretty basic, e.g. the core is just: upstream myservice { server 127.0.0.1:80; server 123.123.123.123:80; } location / { proxy_pass http://myservice; …
Jeroen Ooms
  • 2,239
  • 8
  • 34
  • 51
7
votes
1 answer

Varnish returning 503, FetchError (could not get storage)

On the current setup we're running into a problem with Varnish, we're running a CentOS 5.7 x86_64 xenpv, with Cpanel WHM, hosted at VPS.net. Sometimes we will recieve a Guru Meditation from Varnish, and when we look in the varnishlog with the…
Archan
  • 71
  • 2
7
votes
4 answers

Increase varnish timeout for a specific path

I have a set of scripts on the /admin path that can take a while to execute, and cause Varnish to hit the timeout limit. Is there a way to increase the timeouts for a particular path rather than for an entire backend?
LS55321
  • 171
  • 1
  • 3
7
votes
4 answers

Running Varnish on Windows 7

We are planning on using Varnish Cache 3.0.2 (latest version) for our production environment, however, for development we would like to run Varnish on our local computers, some of us have Win7. The only easy option I could only find to install it…
miguelr
  • 201
  • 1
  • 2
  • 5
7
votes
1 answer

Poor load balancer performance on rackspace and centos

I am load testing different options for load balancing, and am getting poor results from Nginx, haproxy, and varnish. I have one 4GB load balancer at Rackspace, hitting 4x1GB app servers. I'm hitting a url called "/slow" which deliberately waits…
Sean Clark Hess
  • 273
  • 3
  • 13
1 2
3
62 63