a possible dead cycle?

彭伟 weipeng.pengw at alibaba-inc.com
Thu Apr 7 12:39:10 CEST 2011


i don't express myself well,

then i talk about  in detail the whole process i understand, please help me to check it

based on the configuration as below:

sub vcl_fetch {
  if (!obj.cacheable) {
    # Limit the lifetime of all 'hit for pass' objects to 10 seconds
    obj.ttl = 10s;
    pass;
  }
}

1) after varnish get the object from the backend server, then the process will enter the hook vcl_fetch accoding to the configuration code above


2) if the obj is not cacheable, then varnish switch to "pass mode" accoding to the configuration code above

3) entering the pass model means varnish will get the object from the backend server again?





在 2011年4月7日 下午6:10,Traian Bratucu <traian.bratucu at eea.europa.eu<mailto:traian.bratucu at eea.europa.eu>>写道:
Please read the documentation you are referring to. You are talking about “hit for pass” behaviour, it is clearly explained there, in English. Since I cannot explain again in another language, please read it more carefully.

From: 彭伟 [mailto:pwlazy at gmail.com<mailto:pwlazy at gmail.com>]
Sent: Thursday, April 07, 2011 12:05 PM
To: Traian Bratucu
Cc: varnish-misc at varnish-cache.org<mailto:varnish-misc at varnish-cache.org>
Subject: Re: a possible dead cycle?

based on the configuration as below:

sub vcl_fetch {
  if (!obj.cacheable) {
    # Limit the lifetime of all 'hit for pass' objects to 10 seconds

    obj.ttl = 10s;
    pass;
  }
}


when the object is not cacheable, then go to "pass" which means going to fetch the object from the backend server again?

2011/4/7 Traian Bratucu <traian.bratucu at eea.europa.eu<mailto:traian.bratucu at eea.europa.eu>>
No, if an object is not cacheable, it will simply not be cached (stored in memory and later served from here instead of fetching from the backend), but IT WILL BE DELIVERED to the client.
The only time varnish will re-fetch the object from the backend is on a new client request.

Traian

From: varnish-misc-bounces at varnish-cache.org<mailto:varnish-misc-bounces at varnish-cache.org> [mailto:varnish-misc-bounces at varnish-cache.org<mailto:varnish-misc-bounces at varnish-cache.org>] On Behalf Of ??
Sent: Thursday, April 07, 2011 11:25 AM
To: varnish-misc at varnish-cache.org<mailto:varnish-misc at varnish-cache.org>
Subject: a possible dead cycle?

   when varnish fetch a page from backend server, and find it 's not  cacheable,  so go to fetch the page from backend sever again?

   and find it 's not  cacheable again , so again and agian .......?

  please help me! thanks !



  Regards!
  pwlazy

_______________________________________________
varnish-misc mailing list
varnish-misc at varnish-cache.org<mailto:varnish-misc at varnish-cache.org>
http://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc


_______________________________________________
varnish-misc mailing list
varnish-misc at varnish-cache.org<mailto:varnish-misc at varnish-cache.org>
http://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc


________________________________

This email (including any attachments) is confidential and may be legally privileged. If you received this email in error, please delete it immediately and do not copy it or use it for any purpose or disclose its contents to any other person. Thank you.

本电邮(包括任何附件)可能含有机密资料并受法律保护。如您不是正确的收件人,请您立即删除本邮件。请不要将本电邮进行复制并用作任何其他用途、或透露本邮件之内容。谢谢。
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20110407/36d474fb/attachment-0003.html>


More information about the varnish-misc mailing list