You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2019/02/11 20:18:29 UTC

[GitHub] ocket8888 commented on a change in pull request #3286: Pattern-based consistent hashing feature for TR/TO/TP

ocket8888 commented on a change in pull request #3286: Pattern-based consistent hashing feature for TR/TO/TP
URL: https://github.com/apache/trafficcontrol/pull/3286#discussion_r255655738
 
 

 ##########
 File path: docs/source/admin/traffic_router.rst
 ##########
 @@ -595,3 +595,35 @@ set in ``/lib/systemd/system/traffic_router.service``.
   	-XX:+UseG1GC \
   	-XX:+UnlockExperimentalVMOptions \
   	-XX:InitiatingHeapOccupancyPercent=30"
+
+Pattern Based Consistent Hashing Feature
+========================================
+
+Overview
+--------
+Pattern based consistent hashing is a feature to modify the request path given to Traffic Router's consistent hasher for Cache selection (and Delivery Service selection for Steering Delivery Services) using a regex. This new regex field 'Consistent Hash Regex' is applied on a per-Delivery Service basis and is given to Traffic Router via the CRConfig. The purpose of this feature is to increase cache efficiency by directing requests for the same asset, but with varying request paths, to the same cache.
+
+.. Note:: Pattern Based Consistent Hashing is only available for HTTP and Steering Delivery Services
+
+How it Works
+------------
+
+With Pattern Based Consistent Hashing, a regex (Consistent Hash Regex) is applied to the request path to extract matching elements to build a new string to pass to the consistent hasher. i.e.: using the Consistent Hash Regex ``/.*?(/.*?/).*?(m3u8)`` given the request paths ``/test/path/asset.m3u8`` and ``/other/path/asset.m3u8`` the resulting path to hash will be ``/path/m3u8``
 
 Review comment:
   Please use the `:regexp:` text role for regular expressions e.g.
   
   ```rst
   :regexp:`/.*?(/.*?/).*?(m3u8)`
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services