varnish

Varnish + nginx + ELB 499 responses

我怕爱的太早我们不能终老 提交于 2019-12-03 23:03:40
问题 I am having varnish 4 server working with nginx as reverse proxy connected to ELB. Every 2 days or so my server is stop responding and I see 499 responses in nginx access.log restarting nginx is solving the problem. Why am I started to get these 499 responses? Why restarting nginx solving the issue? 回答1: I solved my issue after understanding two facts: 1) ELB instance has dynamic DNS name 2) nginx resolve DNS names only on reload/restart The problem was that the ELB changed its IP address and

How to Set Varnish Cache-Control Headers

烂漫一生 提交于 2019-12-03 19:30:49
问题 I am hoping someone can advise on the proper method for getting Varnish to send cache-control headers. Currently, my configuration is sending "Cache-Control: no-cache" to clients. Thanks in advance to anyone who might be able to help... 回答1: Your back-end is sending "Cache-Control: no-cache" to Varnish which implies two things: Varnish will not store the response in the cache (so a next lookup will fail) Your clients (browsers and intermediate proxies) will not cache responses (and request

Varnish 4 Basic authentication

做~自己de王妃 提交于 2019-12-03 15:44:14
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 (they ran Varnish 3) Is there an easy way to configure Basic Authentication in Varnish 4? You can use the VMOD basicauth Install the Varnish VMOD First you need to install it. Download the source from the Git repo for basicauth . Extract into your homedir e.g. ~/vmod-basicauth/ You'll also need the Varnish source to build the VMOD. In Debian/Ubuntu

Varnish and ESI, how is the performance?

你说的曾经没有我的故事 提交于 2019-12-03 12:39:24
Im wondering how the performance of th ESI module is nowadays? I've read some posts on the web that ESI performance on varnish were actually slower than the real thing. Say i had a page with over 3500 esi includes, how would this perform? is esi designed for such usage? We're using Varnish and ESI to embed sub-documents into JSON documents. Basically a response from our app-server looks like this: [ <esi:include src="/station/best_of_80s" />, <esi:include src="/station/herrmerktradio" />, <esi:include src="/station/bluesclub" />, <esi:include src="/station/jazzloft" />, <esi:include src="

User-friendly error pages from Varnish

邮差的信 提交于 2019-12-03 11:55:58
问题 We are using Varnish at the front of Plone. In the case Plone goes down or serves an internal error we'd like to show a user-friendly static HTML page which some CSS styling + images. ("The server is being updated page") How to configure Varnish to do this? 回答1: You can customize the synthetic page being served on a vlc_error. The default.vcl configuration file already shows how to do this, by serving the famous "Guru Meditation" error page (ahh, those wonderful Amiga days). An example

Varnish: purge if I have cookie in hash_data

匿名 (未验证) 提交于 2019-12-03 10:24:21
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Problem : I couldn't purge my page. After many time I decided to find out how purge works and find! As you can see we have used a new action - return(purge). This ends execution of vcl_recv and jumps to vcl_hash. This is just like we handle a regular request. When vcl_hash calls return(lookup) varnish will purge the object and then call vcl_purge. Here you have the option of adding any particular actions you want Varnish to take once it has purge the object. docs And then I understood that I have cookie in hash_data and I can't purge

varnish 503 service unavailable

谁都会走 提交于 2019-12-03 10:05:51
问题 My varnish version is 3.0 . My server works well while I curl the URLs, but when use varnish cache it return 503 service unavailable occasionally. The log info likes is: 0 Debug - "VCL_error(200, OK)" 24 VCL_call c recv error 24 VCL_call c error deliver 24 SessionClose c error 0 Debug - "VCL_error(200, OK)" 27 VCL_call c recv error 27 VCL_call c error deliver 27 SessionClose c error 0 Debug - "VCL_error(200, OK)" 16 VCL_call c recv error 16 VCL_call c error deliver 16 SessionClose c error 14

Varnish: Make cache dependent on X-Forwarded-Proto https

匿名 (未验证) 提交于 2019-12-03 09:02:45
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: following situation: On the server is a apache and Varnish for caching. SSL is handled by an amazon load balancer. If the page is requested using https, the http header "X-Forwarded-Proto" is set to "https". The pages are sometimes different (e.g. links/images have to be fetched using https when using a secure connection) How can I tell varnish that pages are different if the X-Forwarded-Proto header differs? As it is now, whatever is accessed first is cached and served for http and https! 回答1: What you want, I presume, is to have different

Magento Hole puch With Varnish

青春壹個敷衍的年華 提交于 2019-12-03 08:55:34
问题 I recently installed the varnish 3.x in system (ubuntu) and configured it to 8080. Now full page caching is enabled and its working fine. I just want to ignore some specific dynamic blocks of the page. How can i do with magento. Also i am not using Magentos default caching techniques so i disabled it. also tried module Terpentine Thanks & Regard Rajesh Ganjeer 回答1: I have done this using Try this in local.xml inside the app/design/frontend/XXX/XXX/layout/local.xml file: <reference name="block

How to make Varnish ignore, not delete cookies [closed]

扶醉桌前 提交于 2019-12-03 08:44:30
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 years ago . 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 customizations are all stored in a signed-cookie and are dynamically