Questions tagged [varnish]

Varnish is an open source reverse HTTP proxy with extensive caching abilities, i.e. a web accelerator. It is frequently used in front of websites to cache webpages in memory.

This tag is for questions about Varnish Cache. Varnish cache is a reverse http proxy that caches, i.e. a web accelerator. It is open source software used to speed up websites.

2066 questions
20
votes
1 answer

How do I get the req.url in vcl_backend_response?

My configs are based on Varnish 3.0 and I have been updating them. But I ran into a snag. vcl_fetch was replace to vcl_backend_response. Inside of vcl_fetch you used to be able to use req.url but not anymore inside of vcl_backend_response. So I am…
jnbdz
  • 4,863
  • 9
  • 51
  • 93
20
votes
3 answers

Which method of caching is the fastest/lightest for Node/Mongo/NginX?

I've been tasked to work on a project for a client that has a site which he is estimating will receive 1-2M hits per day. He has an existing database of 58M users that need to get seeded on a per-registration basis for the new brand. Most of the…
Maverick
  • 3,039
  • 6
  • 26
  • 35
20
votes
2 answers

List contents of varnish cache?

Is there a way to list the contents of the varnish cache storage? Also, it would be nice to somehow list the most frequent cache hits. I found a way to see the most frequent cache misses by listing what is being sent to the backend with: varnishtop…
Martin Taleski
  • 6,033
  • 10
  • 40
  • 78
20
votes
1 answer

How to structure a Symfony2 app with ESI?

On a new project with lot of traffic, we are thinking on how to structure our Symfony2 app to take advantage of caches, and be ready to be more aggressive in the future. I'd love to know your opinion. Let's say a user requests a page a list of…
fesja
  • 3,313
  • 6
  • 30
  • 42
20
votes
1 answer

Varnish slow when the object is cached (memory)

One of my customer came with a problem of speed for varnish. Long debug, short : When varnish get an object from his cache (memory), it's really sluggish (> 5 seconds), when varnish need to get the object from the apache backend, no speed problem…
Julien C.
  • 201
  • 2
  • 6
19
votes
2 answers

Regex Syntax changes between POSIX and PCRE

We are currently in the process of upgrading our Varnish Cache servers. As part of the process, we upgraded only one of them to see how it behaves compared to the older versions. Some of the major changes made in this new version is changing the…
Ken
  • 691
  • 5
  • 14
19
votes
1 answer

How to make Varnish ignore, not delete cookies

I want to use Varnish to cache certain pages even in the presence of cookies. There are 3 possibilities that I need to take care of: An anonymous user is viewing some page A logged in user is viewing some page with light customization. These…
Jason Christa
  • 12,150
  • 14
  • 58
  • 85
17
votes
7 answers

Getting Varnish To Work on Magento

First please forgive me for total lack of understanding of Varnish. This is my first go at doing anything with Varnish. I am following the example at: http://www.kalenyuk.com.ua/magento-performance-optimization-with-varnish-cache-47.html However…
Josh Pennington
  • 6,418
  • 13
  • 60
  • 93
17
votes
3 answers

Weird Varnish 503 error - what does this mean?

My online whiteboard application has been working previously, but for whatever reason, it no longer works. Now it shows a 503 Varnish cache error as seen here: http://grab.by/eFHG Do you happen to know where I should start to look to try to resolve…
Donny
  • 955
  • 3
  • 14
  • 19
16
votes
4 answers

Is it good to have Memcache, APC and Varnish on LAMP servers

I have 3 web servers I need to optimize. I currently have just a little over 2000 unique visitors a day and I want to improve performances on my servers to make sure when I will get more traffic everything will run smooth. I read (on some blogs)…
Tech4Wilco
  • 6,740
  • 5
  • 46
  • 81
16
votes
4 answers

How to check if Varnish cache is working correctly?

I'm using Varnish Cache on a Wordpress website that runs on Nginx. It's configured the way mentioned in this blog. It's working, but I'm not sure if it's actually serving content from the cache. How to know for sure? Can someone please guide me. I'm…
LittleLebowski
  • 7,691
  • 13
  • 47
  • 72
16
votes
4 answers

Varnish purge using HTTP and REGEX

I want to purge Elements of my varnish using HTTP. This http call is triggered from a backend server behind the varnish itself, so the backend server has not other access but HTTP. I have implemented the following purging rules with the according…
MatthiasLaug
  • 2,924
  • 6
  • 28
  • 43
15
votes
3 answers

Varnish: cache only specific domain

I have been Googling aggressively, but without luck. I'm using Varnish with great results, but I would like to host multiple websites on a single server (Apache), without Varnish caching all of them. Can I specify what websites by URL to…
Rune
  • 171
  • 1
  • 1
  • 8
15
votes
9 answers

Using an AWS ELB behind Varnish - is it possible?

I'm trying to put a set of EC2 instances behind a couple of Varnish servers. Our Varnish configuration very seldom changes (once or twice a year) but we are always adding/removing/replacing web backends for all kinds of reasons (updates, problems,…
user1950119
  • 181
  • 1
  • 2
  • 4
15
votes
5 answers

How to setup Varnish logging?

I want to get Varnish to log requests. I found the command varnishlog -a -w /var/log/varnish.log, but it does not log anything. Then I found that Varnish does not write to log by default. However I am unable to find configuration options for…
Muneeb Nasir
  • 2,414
  • 4
  • 31
  • 54