You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by GitBox <gi...@apache.org> on 2021/05/27 18:30:40 UTC

[GitHub] [trafficserver] jrushford opened a new pull request #7897: Adds a new peering ring mode to next hop selection strategies.

jrushford opened a new pull request #7897:
URL: https://github.com/apache/trafficserver/pull/7897


   Adds a new peering consistent hash ring mode to next hop strategies.  This lets you build an edge group
   of caches that share their cache.  When a request comes to a cache, that caches peers are checked using
   consistent hash for the requested object.  If the peer does not have the object in it's cache, it will request the
   object from an upstream parent or origin.  In the case where a request caches to the host itself, the request is
   forwarded to the upstream parent or origin.  A new configuration parameter to the next hop strategies.yaml.
   allows you to disable caching when a requested object is fetched from a peer in the cache group or pod.  This
   allows for cache sharing among hosts at the edge.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficserver] jrushford commented on a change in pull request #7897: Adds a new peering ring mode to next hop selection strategies.

Posted by GitBox <gi...@apache.org>.
jrushford commented on a change in pull request #7897:
URL: https://github.com/apache/trafficserver/pull/7897#discussion_r640976957



##########
File path: configs/strategies.yaml.default
##########
@@ -95,15 +95,24 @@
 #     hash_key: hostname # optional key to use for Hashing. Enum of 'url' or 'uri' or 'hostname' or 'path' or 'path+query' or 'cache_key' or 'path+fragment'
 #     go_direct: true # transactions may routed directly to the origin true/false default is true.
 #     parent_is_proxy: false  # next hop hosts  are origin servers when set to 'false', defaults to true and indicates next hop hosts are ats cache's.
+#     cache_peer_result: true # only used when the 'ring_mode' is set to 'peering_ring' and the policy is 'consistent_hash'.  The default value is
+#                        true which means to always allow caching responses.  When set to 'false' reponses received from peer hosts will not be
+#                        cached, only responses received from upstream parents or origins will be cached.
 #     groups: # groups of hosts, these groups are used as rings in consistent hash and arrays of host groups for round_robin.
 #       - *g1
 #       - *g2
 #     scheme: http
 #     failover:
 #       max_simple_retries: 2 # default is 1, indicates the maximum number of simple retries for the listed response codes.
-#       ring_mode: exhaust_ring # enumerated as exhaust_ring or alternate_ring
+#       ring_mode: exhaust_ring # enumerated as exhaust_ring, alternate_ring, or peering_ring
 #           #1) in 'exhaust_ring' mode all the servers in a ring are exhausted before failing over to secondary ring
 #           #2) in 'alternate_ring' mode causes the failover to another server in secondary ring.
+#           #3) 'peering_ring' is implemented for only a policy of 'consistent_hash' and requires that the strategy
+#               has two host groups defined.  The first group is the 'peer' group of caches that also includes this host
+#               itself.  The second group is the 'upstream' group of caches.  All parent host lookups are looked up from

Review comment:
       sure that's possible but, that vip should be added to the 2nd group and it's fine if it only has one member.  Are you asking for a change in the documentation @ywkaras ?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficserver] jrushford commented on pull request #7897: Adds a new peering ring mode to next hop selection strategies.

Posted by GitBox <gi...@apache.org>.
jrushford commented on pull request #7897:
URL: https://github.com/apache/trafficserver/pull/7897#issuecomment-864195018


   @zwoop It's not that big of a change but, it does add the peering capability we talked about.  I think it would be a big plus to get it into 9.1.   It is a feature that we wish to use at Comcast and Verizon wishes to use it as well.  Walt has written an autest specifically to test this feature.  However, it cleanly cherry picks to 9.1 so, we can always just cherry pick it to our internal build.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficserver] jrushford merged pull request #7897: Adds a new peering ring mode to next hop selection strategies.

Posted by GitBox <gi...@apache.org>.
jrushford merged pull request #7897:
URL: https://github.com/apache/trafficserver/pull/7897


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficserver] ywkaras commented on a change in pull request #7897: Adds a new peering ring mode to next hop selection strategies.

Posted by GitBox <gi...@apache.org>.
ywkaras commented on a change in pull request #7897:
URL: https://github.com/apache/trafficserver/pull/7897#discussion_r641001034



##########
File path: configs/strategies.yaml.default
##########
@@ -95,15 +95,24 @@
 #     hash_key: hostname # optional key to use for Hashing. Enum of 'url' or 'uri' or 'hostname' or 'path' or 'path+query' or 'cache_key' or 'path+fragment'
 #     go_direct: true # transactions may routed directly to the origin true/false default is true.
 #     parent_is_proxy: false  # next hop hosts  are origin servers when set to 'false', defaults to true and indicates next hop hosts are ats cache's.
+#     cache_peer_result: true # only used when the 'ring_mode' is set to 'peering_ring' and the policy is 'consistent_hash'.  The default value is
+#                        true which means to always allow caching responses.  When set to 'false' reponses received from peer hosts will not be
+#                        cached, only responses received from upstream parents or origins will be cached.
 #     groups: # groups of hosts, these groups are used as rings in consistent hash and arrays of host groups for round_robin.
 #       - *g1
 #       - *g2
 #     scheme: http
 #     failover:
 #       max_simple_retries: 2 # default is 1, indicates the maximum number of simple retries for the listed response codes.
-#       ring_mode: exhaust_ring # enumerated as exhaust_ring or alternate_ring
+#       ring_mode: exhaust_ring # enumerated as exhaust_ring, alternate_ring, or peering_ring
 #           #1) in 'exhaust_ring' mode all the servers in a ring are exhausted before failing over to secondary ring
 #           #2) in 'alternate_ring' mode causes the failover to another server in secondary ring.
+#           #3) 'peering_ring' is implemented for only a policy of 'consistent_hash' and requires that the strategy
+#               has two host groups defined.  The first group is the 'peer' group of caches that also includes this host
+#               itself.  The second group is the 'upstream' group of caches.  All parent host lookups are looked up from

Review comment:
       No that's fine as long as a group is allowed to have a one member that should handle the upstream VIP case.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficserver] jrushford commented on pull request #7897: Adds a new peering ring mode to next hop selection strategies.

Posted by GitBox <gi...@apache.org>.
jrushford commented on pull request #7897:
URL: https://github.com/apache/trafficserver/pull/7897#issuecomment-849987150


   [approve ci autest]


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficserver] jrushford merged pull request #7897: Adds a new peering ring mode to next hop selection strategies.

Posted by GitBox <gi...@apache.org>.
jrushford merged pull request #7897:
URL: https://github.com/apache/trafficserver/pull/7897


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficserver] ywkaras commented on a change in pull request #7897: Adds a new peering ring mode to next hop selection strategies.

Posted by GitBox <gi...@apache.org>.
ywkaras commented on a change in pull request #7897:
URL: https://github.com/apache/trafficserver/pull/7897#discussion_r640909701



##########
File path: configs/strategies.yaml.default
##########
@@ -95,15 +95,24 @@
 #     hash_key: hostname # optional key to use for Hashing. Enum of 'url' or 'uri' or 'hostname' or 'path' or 'path+query' or 'cache_key' or 'path+fragment'
 #     go_direct: true # transactions may routed directly to the origin true/false default is true.
 #     parent_is_proxy: false  # next hop hosts  are origin servers when set to 'false', defaults to true and indicates next hop hosts are ats cache's.
+#     cache_peer_result: true # only used when the 'ring_mode' is set to 'peering_ring' and the policy is 'consistent_hash'.  The default value is
+#                        true which means to always allow caching responses.  When set to 'false' reponses received from peer hosts will not be
+#                        cached, only responses received from upstream parents or origins will be cached.
 #     groups: # groups of hosts, these groups are used as rings in consistent hash and arrays of host groups for round_robin.
 #       - *g1
 #       - *g2
 #     scheme: http
 #     failover:
 #       max_simple_retries: 2 # default is 1, indicates the maximum number of simple retries for the listed response codes.
-#       ring_mode: exhaust_ring # enumerated as exhaust_ring or alternate_ring
+#       ring_mode: exhaust_ring # enumerated as exhaust_ring, alternate_ring, or peering_ring
 #           #1) in 'exhaust_ring' mode all the servers in a ring are exhausted before failing over to secondary ring
 #           #2) in 'alternate_ring' mode causes the failover to another server in secondary ring.
+#           #3) 'peering_ring' is implemented for only a policy of 'consistent_hash' and requires that the strategy
+#               has two host groups defined.  The first group is the 'peer' group of caches that also includes this host
+#               itself.  The second group is the 'upstream' group of caches.  All parent host lookups are looked up from

Review comment:
       Isn't it possible that the upstream group uses a VIP? In that case would the upstream group just have one member, the VIP hostname?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org