Return-Path: Delivered-To: apmail-trafficserver-users-archive@www.apache.org Received: (qmail 63875 invoked from network); 22 Dec 2010 19:40:26 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 22 Dec 2010 19:40:26 -0000 Received: (qmail 32760 invoked by uid 500); 22 Dec 2010 19:40:26 -0000 Delivered-To: apmail-trafficserver-users-archive@trafficserver.apache.org Received: (qmail 32717 invoked by uid 500); 22 Dec 2010 19:40:26 -0000 Mailing-List: contact users-help@trafficserver.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@trafficserver.apache.org Delivered-To: mailing list users@trafficserver.apache.org Received: (qmail 32709 invoked by uid 99); 22 Dec 2010 19:40:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Dec 2010 19:40:26 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [64.39.1.224] (HELO mx2.sat.rackspace.com) (64.39.1.224) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Dec 2010 19:40:21 +0000 Received: from SAT2EXH02.RACKSPACE.CORP ([10.3.22.154]) by mx2.sat.rackspace.com (8.14.2/8.14.2) with ESMTP id oBMJdtXe028505 for ; Wed, 22 Dec 2010 13:40:01 -0600 (envelope-from glen.campbell@rackspace.com) Received: from SAT2EXD03.RACKSPACE.CORP ([169.254.3.150]) by SAT2EXH02.RACKSPACE.CORP ([10.3.22.154]) with mapi id 14.01.0255.000; Wed, 22 Dec 2010 13:40:00 -0600 From: Glen Campbell To: "users@trafficserver.apache.org" Subject: Re: ATS to return cached contents on 500 error Thread-Topic: ATS to return cached contents on 500 error Thread-Index: AQHLogx9ek91ak7irUCv7S/BirAW25Os2+4A Date: Wed, 22 Dec 2010 19:39:59 +0000 Message-ID: <26852_1293046801_oBMJdtXe028505_C937AFD0.9F0%glen.campbell@RACKSPACE.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.2.0.101115 x-originating-ip: [10.6.61.16] Content-Type: text/plain; charset="us-ascii" Content-ID: <2512DD7DEE36354CA8F9FCCBF7F457C3@RACKSPACE.CORP> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 The stale-if-error directive should cause that behavior, but I'm not certain if it's been implemented in ATS yet (online documentation refers to "future versions"). You could certainly write a custom extension to do that if you don't want to rely upon the client headers. http://www.mnot.net/blog/2007/12/12/stale On 12/22/10 1:13 PM, "John Cheng" wrote: >Can ATS be configured (as a forward proxy) to return cached contents >when the origin server returns an error? > >This may be an unusual use case, and I'll describe the scenario I >think where it might be needed. I want to use ATS as a forward proxy >between our application servers and external web services. This allows >us to reduce the number of web services calls and use local caching to >increase performance. In this case, one of our external partners has a >flaky web service system. The contents of their web service does not >change often and is suitable for caching the contents daily. However, >some times, their web service will return a 404 or 500 for a whole >day, then go back to normal the next day. So the behavior I'd like is >for our system to check to origin server for any changes. If there is >a change, update the local cache. If there is an error (404, 500), or >time out then continue to use the cached content. > >I looked into the configuration file and it does not appear ATS >supports this kind of behavior. I am wondering if this is possible >with ATS. > >--=20 >--- >John L Cheng Confidentiality Notice: This e-mail message (including any attached or embedded documents) is intended for the exclusive and confidential use of t= he individual or entity to which this message is addressed, and unless otherwi= se expressly indicated, is confidential and privileged information of Rackspac= e. Any dissemination, distribution or copying of the enclosed material is proh= ibited. If you receive this transmission in error, please notify us immediately by = e-mail at abuse@rackspace.com, and delete the original message. Your cooperation is appreciated.