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

Is it possible for Rails sessions to be created 'just in time'?

My understanding of the session lifecycle in Ruby on Rails (specifically v3 and upwards) is that a session is created at the start of a request, for each and every request, and if that request doesn't carry an existing session cookie a new one will…
Matthew Savage
  • 3,794
  • 10
  • 43
  • 53
6
votes
2 answers

Common varnish: difference between beresp & resp, bereq & req; req.ttl & beresp.ttl

Tell me please, whats the difference between these concepts? I didn't found any answers in documentations of Varnish. They just operative these concepts, nothing more. And what is better to use for caching: beresp.ttl or max-age in Cache-control…
6
votes
1 answer

Varnish fails to start with : failed to map segment from shared object: Operation not permitted

I installed varnish from epel repo on a CentOS 6.7, and it fails to start with following error : Compiled VCL program failed to load: ./vcl.1P9zoqAU.so: failed to map segment from shared object: Operation not permitted VCL compilation failed If I…
6
votes
2 answers

Is it possible to prevent caching based on the size of the backend response in Varnish?

We're caching for a problematic IIS server that sometimes just sends empty responses (0 bytes) instead of proper ones. Caching these responses would be a disaster, and we have no way of fixing the problem as it's not our server. Instead I'd like to…
Hubro
  • 56,214
  • 69
  • 228
  • 381
6
votes
2 answers

Make Varnish only cache pages when a user isn't logged in (Laravel 5)

Laravel sets a cookie even when a user is not logged in. This forces Varnish to send every request to the backend. I've come across some people (http://abeak.blogspot.co.uk/2014/12/caching-laravel-with-varnish.html) using Session Monster package,…
Chris
  • 3,729
  • 22
  • 30
6
votes
1 answer

Varnish 3: "Expected return action name" when using "synth"

Using Varnish 3.0.7. In order to forward any non-SSL connections I've added the following subroutine to my VCL: sub vcl_synth { if (resp.status == 750) { set resp.status = 301; set resp.http.Location = req.http.x-redir; …
Fredrik
  • 1,741
  • 4
  • 24
  • 40
6
votes
1 answer

Varnish: Purge says it works but doesn't remove old content

I'm running a stand alone instance of varnish on a Digital Ocean Ubuntu VM which basically works fine. The setup is used to take load of an older wordpress server that sits anyhwere else. That works quite well but i'm having a hard time getting…
Helmi
  • 489
  • 7
  • 25
6
votes
2 answers

Magento with SSL + Varnish

I want to use Varnish on our Magento store to make it faster. We run CentOS 6.6 with DirectAdmin. But our entire store always loads on a https connection. What is the best way to install varnish for our store with SSL?
JGeer
  • 1,768
  • 1
  • 31
  • 75
6
votes
1 answer

Varnish 4, Purging - I thought I had it all figured out

Well, I'll keep it simple, PURGE requests (or so I thought?) were pretty much all handled by literally: acl purge { "localhost"; "127.0.0.1"; } and then if (req.method == "PURGE") { if (!client.ip ~ purge) { …
alturic
  • 53
  • 2
  • 8
6
votes
4 answers

Varnish 4 Basic authentication

I have to cache multiple backend servers, I switch from Nginx to Varnish and finally discover 2 server need to run HTTP Basic Authentication. I try this link http://blog.tenya.me/blog/2011/12/14/varnish-http-authentication and it not work for me…
billyduc
  • 692
  • 2
  • 8
  • 15
6
votes
2 answers

Make Varnish ignore requests with Cookie header

Varnish default behaviour is to never lookup for requests containing a Cookie header. In other words, a request containing a Cookie header will never be cached. I need to override this behaviour to just ignore requests with a Cookie header. Consider…
Alberto Fernández
  • 1,568
  • 13
  • 22
6
votes
2 answers

Hiredis timeout with large number of concurrent requests

I'm using a redis integration plugin for Varnish called libvmod-redis. I'm seeing an issue where if I get a large number of concurrent requests, around 350, redis starts timing out and I eventually get a segfault in Varnish. I get these…
Brandon
  • 16,382
  • 12
  • 55
  • 88
6
votes
2 answers

How to use Varnish to cache RESTful API, but still use HMAC for signing/verifying each request?

I am interested in using Varnish to cache/throttle/etc responses to a RESTful API I am creating. I may be using the term/acronym "HMAC" too loosely, but what I mean is that each request to my API should include a header that includes a hash that was…
Kevin Mitchell
  • 325
  • 1
  • 5
  • 13
6
votes
3 answers

Having "utm_" in the URL string breaks the $_GET variable in Wordpress

First note: This site is hosted on WPEngine (varnish caching), but I can't seem to replicate the issue on another server. We need to be able to access the $_GET php variable on some pages. For testing, I modified our Wordpress header.php to do a…
James R
  • 651
  • 1
  • 12
  • 21
6
votes
2 answers

Nginx FastCGI cache VS Varnish?

I'm currently developing a high-performance, high-load web application. I'm currently running nginx with FastCGI for PHP-FPM, APC (opcode cache) but also it's new feature; FastCGI cache. FastCGI cache allows me to cache dynamic content (like php…
Eric
  • 18,532
  • 2
  • 34
  • 39