This is an automated email from the ASF dual-hosted git repository. mlibbey pushed a commit to branch master in repository https://git-dual.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push: new dab332a Clarify parent selection. dab332a is described below commit dab332a0eadb194d600172d3a66dd5e52971a003 Author: Miles Libbey <mlib...@apache.org> AuthorDate: Mon Nov 7 13:44:35 2016 -0800 Clarify parent selection. --- .../configuration/hierachical-caching.en.rst | 19 +++++++++++++++ doc/admin-guide/files/parent.config.en.rst | 28 ++++++++++++---------- 2 files changed, 35 insertions(+), 12 deletions(-) diff --git a/doc/admin-guide/configuration/hierachical-caching.en.rst b/doc/admin-guide/configuration/hierachical-caching.en.rst index 9d5790f..32964c9 100644 --- a/doc/admin-guide/configuration/hierachical-caching.en.rst +++ b/doc/admin-guide/configuration/hierachical-caching.en.rst @@ -76,6 +76,25 @@ 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. +Parent Selection Policies +------------------------- + +There are several parent selection policies available to the Traffic Server child +node. + + - Consistent Hash. The child node chooses a specific parent for each URI. This effectively + makes the parent's cache size the sum total of each of the individual parent cache + sizes. + - Round Robin. The child node cycles through the parents. The child can select the parent + based on the client IP ("true"), or in a strict cycling ("strict"). + - (Unnamed). The child node chooses the first live parent listed. There are two variants to this + strategy. When the strategy is set to "false," the child will use the first listed parent + (for clarity called p1) until it is marked down, when the child will switch to the second + listed parent (p2). Then, when the p1 is retested and found live, the child + will restart using p1. When the selection strategy is set to "latched," the child will use + p1 until it is marked down, when it will switch to p2. When p1 is retested and found live, + the child will continue using p2 until it is marked down. + Interaction with Remap.config ----------------------------- diff --git a/doc/admin-guide/files/parent.config.en.rst b/doc/admin-guide/files/parent.config.en.rst index 93238d7..9f8ff9d 100644 --- a/doc/admin-guide/files/parent.config.en.rst +++ b/doc/admin-guide/files/parent.config.en.rst @@ -69,7 +69,8 @@ allowed values. The secondary specifiers are optional in the :file:`parent.config` file. The following list shows the possible secondary specifiers and their allowed -values. +values. Every line in the :file:`parent.config` file must contain either a +``parent=`` or ``go_direct=`` directive. .. _parent-config-format-port: @@ -195,8 +196,7 @@ The following list shows the possible actions and their allowed values. ``round_robin`` One of the following values: - - ``true`` - Traffic Server goes through the parent cache list in a - round robin-based on client IP address. + - ``true`` - Traffic Server determines the parent based on client IP address. - ``strict`` - Traffic Server machines serve requests strictly in turn. For example: machine ``proxy1`` serves the first request, ``proxy2`` serves the second request, and so on. @@ -207,8 +207,8 @@ The following list shows the possible actions and their allowed values. The other traffic is unaffected. Once the downed parent becomes available, the traffic distribution returns to the pre-down state. - - ``latched`` - The first parent in the list is marked as primary and is - always chosen until connection errors cause it to be marked down. When + - ``latched`` - The first parent in the list is marked as primary and is + always chosen until connection errors cause it to be marked down. When this occurs the next parent in the list then becomes primary. The primary will wrap back to the first parent in the list when it is the last parent in the list and is marked down due to a connection error. Newly chosen @@ -230,7 +230,9 @@ The following list shows the possible actions and their allowed values. One of the following values: - ``consider`` - Use the query string when finding a parent. - - ``ignore`` - Do not consider the query string when finding a parent. + - ``ignore`` - Do not consider the query string when finding a parent. This + is especially useful when using the ``consistent_hash`` selection strategy, + and a random query string would prevent a consistent parent selection. Examples ======== @@ -241,16 +243,18 @@ Traffic Server (which is the child) and two parents, ``p1.x.com`` and the parent servers ``p1.x.com`` and ``p2.x.com`` in a round-robin fashion:: - round_robin=true dest_domain=. method=get parent="p1.x.com:8080; p2.y.com:8080" round_robin=true - round_robin=consistent_hash - dest_domain=. method=get parent="p1.x.com:8080|1.0; p2.y.com:8080|2.0" round_robin=consistent_hash The following rule configures Traffic Server to route all requests containing the regular expression ``politics`` and the path ``/viewpoint`` directly to the origin server (bypassing any parent -hierarchies): ``url_regex=politics prefix=/viewpoint go_direct=true`` +hierarchies):: -Every line in the :file:`parent.config` file must contain either a -``parent=`` or ``go_direct=`` directive. + url_regex=politics prefix=/viewpoint go_direct=true + +The following configures Traffic Server to route http requests for example.com (neither +https nor www.example.com would match) through parent servers. Each url will be hashed +to a specific parent. If the chosen parent has been marked down, a parent from the +secondary ring will be chosen for the retry.:: + dest_host=example.com scheme=http parent="p1.x.com:80,p2.x.com:80" secondary_parent="p3.x.com:80,p4.x.com:80" round_robin=consistent_hash go_direct=false -- To stop receiving notification emails like this one, please contact ['"commits@trafficserver.apache.org" <commits@trafficserver.apache.org>'].