From commits-return-13201-apmail-trafficserver-commits-archive=trafficserver.apache.org@trafficserver.apache.org Mon Mar 9 00:37:37 2015 Return-Path: X-Original-To: apmail-trafficserver-commits-archive@www.apache.org Delivered-To: apmail-trafficserver-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5F6DA10E43 for ; Mon, 9 Mar 2015 00:37:37 +0000 (UTC) Received: (qmail 55571 invoked by uid 500); 9 Mar 2015 00:37:37 -0000 Delivered-To: apmail-trafficserver-commits-archive@trafficserver.apache.org Received: (qmail 55512 invoked by uid 500); 9 Mar 2015 00:37:37 -0000 Mailing-List: contact commits-help@trafficserver.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@trafficserver.apache.org Delivered-To: mailing list commits@trafficserver.apache.org Received: (qmail 55503 invoked by uid 99); 9 Mar 2015 00:37:37 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Mar 2015 00:37:37 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id A1454DFD4C; Mon, 9 Mar 2015 00:37:36 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: mlibbey@apache.org To: commits@trafficserver.apache.org Message-Id: <2c12ae11edd24c82ad39028c72e848b2@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: trafficserver git commit: Clarifications about how parent caches work with remapping Date: Mon, 9 Mar 2015 00:37:36 +0000 (UTC) Repository: trafficserver Updated Branches: refs/heads/master a639d04ed -> c6c910bc0 Clarifications about how parent caches work with remapping Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/c6c910bc Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/c6c910bc Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/c6c910bc Branch: refs/heads/master Commit: c6c910bc0609ed92918a204341f55dcb23b2288e Parents: a639d04 Author: Miles Libbey Authored: Sun Mar 8 17:36:20 2015 -0700 Committer: Miles Libbey Committed: Sun Mar 8 17:36:25 2015 -0700 ---------------------------------------------------------------------- doc/admin/hierachical-caching.en.rst | 40 +++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/c6c910bc/doc/admin/hierachical-caching.en.rst ---------------------------------------------------------------------- diff --git a/doc/admin/hierachical-caching.en.rst b/doc/admin/hierachical-caching.en.rst index 65b076d..5c4443e 100644 --- a/doc/admin/hierachical-caching.en.rst +++ b/doc/admin/hierachical-caching.en.rst @@ -74,6 +74,41 @@ content from the origin server (or from another cache, depending on the parent configuration). The parent caches the content and then sends a copy to Traffic Server (its child), where it is cached and served to the client. +Interaction with Remap.config +----------------------------- + +If remap rules are required (:ts:cv:`proxy.config.reverse_proxy.enabled`), +when a request comes in to a child node, its :file:`remap.config` is evaluated before +parent selection. This means that the client request is translated according to the +remap rule, and therefore, any parent selection should be made against the remapped +host name. This is true regardless of pristine host headers +(:ts:cv:`proxy.config.url_remap.pristine_host_hdr`) being enabled or not. The parent node +will receive the translated request (and thus needs to be configured to accept it). + + +Example +~~~~~~~ +The client makes a request to Traffic Server for http://example.com. The origin server +for the request is http://origin.example.com; the parent node is ``parent1.example.com``, +and the child node is configured as a reverse proxy. + +If the child's :file:`remap.config` contains + +``map http://example.com http://origin.example.com`` + +with the child's :file:`parent.config` containing + +``dest_domain=origin.example.com method=get parent="parent1.example.com:80`` ) + +and parent cache (parent1.example.com) would need to have a :file:`remap.config` +line similar to + +``map http://origin.example.com http://origin.example.com`` + +With this example, if parent1.example.com is down, the child node would automatically +directly contact the ``origin.example.com`` on a cache miss. + + Parent Failover --------------- @@ -99,8 +134,9 @@ the configuration adjustments detailed below. .. note:: - You need to configure the child cache only. No additional configuration is - needed for the nodes acting as Traffic Server parent caches. + You need to configure the child cache only. Assuming the parent nodes are + configured to serve the child's origin server, no additional configuration is + needed for the nodes acting as Traffic Server parent caches. #. Enable the parent caching option by adjusting :ts:cv:`proxy.config.http.parent_proxy_routing_enable` in