You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by GitBox <gi...@apache.org> on 2020/04/20 19:36:20 UTC

[GitHub] [trafficserver] traeak opened a new pull request #6691: Slice plugin: self heal when asset etag/last-modified block mismatches

traeak opened a new pull request #6691:
URL: https://github.com/apache/trafficserver/pull/6691


   This tries to make the slice plugin smarter when origins do bad things to assets without changing their path including:
   * etag change
   * last modified change
   * content length change
   
   Process:
   
   1. Reference slice fetched (either slice0 or first slice in request).
   2. Second slice fetched -- mismatch detected
   3. Refetch second slice (cache_range_requests X-Crr-Ims header)
       3a. Matches reference, continue to next slice
       3a. Mismatch reference, abort client, refetch reference slice (X-Crr-Ims header)


----------------------------------------------------------------
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] traeak merged pull request #6691: Slice plugin: self heal when asset etag/last-modified block mismatches

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


   


----------------------------------------------------------------
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] randall commented on pull request #6691: Slice plugin: self heal when asset etag/last-modified block mismatches

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


   [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] traeak commented on pull request #6691: Slice plugin: self heal when asset etag/last-modified block mismatches

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


   9.0.x would be nice.


----------------------------------------------------------------
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] zwoop commented on pull request #6691: Slice plugin: self heal when asset etag/last-modified block mismatches

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


   Is this something you need for 9.0.x? Or 9.1.x ?


----------------------------------------------------------------
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] traeak commented on pull request #6691: Slice plugin: self heal when asset etag/last-modified block mismatches

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


   Update removed some of the error logs and also trimmed more off the autests (traffic_manager -> traffic_server)


----------------------------------------------------------------
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] randall commented on a change in pull request #6691: Slice plugin: self heal when asset etag/last-modified block mismatches

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



##########
File path: plugins/experimental/slice/client.cc
##########
@@ -119,15 +126,30 @@ handle_client_req(TSCont contp, TSEvent event, Data *const data)
 void
 handle_client_resp(TSCont contp, TSEvent event, Data *const data)
 {
-  DEBUG_LOG("%p handle_client_resp %s", data, TSHttpEventNameLookup(event));
+  // DEBUG_LOG("%p handle_client_resp %s", data, TSHttpEventNameLookup(event));

Review comment:
       can this be removed if it's not needed?

##########
File path: doc/admin-guide/plugins/slice.en.rst
##########
@@ -194,30 +216,59 @@ adding in range request headers ("Range: bytes=").  A special
 header X-Slicer-Info header is added and the pristine URL is
 restored.
 
-For each of these blocks separate sequential TSHttpConnect(s) are made
-back into the front end of ATS and all of the remap plugins are rerun.
-Slice skips the remap due to presence of the X-Slicer-Info header and
-allows cache_range_requests.so to serve the slice block back to Slice
-either via cache OR parent request.
-
-Slice assembles a header based on the first slice block response and
-sends it to the client.  If necessary it then skips over bytes in
-the first block and starts sending byte content, examining each
-block header and sends its bytes to the client until the client
-request is satisfied.
-
-Any extra bytes at the end of the last block are consumed by
-the Slice plugin to allow cache_range_requests to finish
-the block fetch to ensure the block is cached.
+For each of these blocks separate sequential TSHttpConnect(s) are
+made back into the front end of ATS.  By default of the remap plugins
+are rerun.  Slice skips the remap due to presence of the X-Slicer-Info
+header and allows cache_range_requests.so to serve the slice block back
+to Slice either via cache OR parent request.
+
+Slice assembles a header based on the very first slice block response
+and sends it to the client.  If necessary it then skips over bytes in the
+first block and starts sending byte content, examining each block header
+and sends its bytes to the client until the client request is satisfied.
+
+Any extra bytes at the end of the last block are consumed by the the
+Slice plugin to allow cache_range_requests to finish the block fetch to
+ensure the block is cached.
+
+Self Healing
+------------
+
+The slice plugin uses the very first slice as a reference slice which
+uses content-length and last-modifed and/or etags to ensure assembled

Review comment:
       modified

##########
File path: doc/admin-guide/plugins/cache_range_requests.en.rst
##########
@@ -125,13 +125,13 @@ special header:
 
 .. code::
 
-    X-CRR-IMS: Tue, 19 Nov 2019 13:26:45 GMT
+    X-Crr-Ims: Tue, 19 Nov 2019 13:26:45 GMT
 
 When this header is provided and a `cache hit fresh` is encoutered the

Review comment:
       encountered




----------------------------------------------------------------
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] traeak commented on a change in pull request #6691: Slice plugin: self heal when asset etag/last-modified block mismatches

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



##########
File path: plugins/experimental/slice/client.cc
##########
@@ -119,15 +126,30 @@ handle_client_req(TSCont contp, TSEvent event, Data *const data)
 void
 handle_client_resp(TSCont contp, TSEvent event, Data *const data)
 {
-  DEBUG_LOG("%p handle_client_resp %s", data, TSHttpEventNameLookup(event));
+  // DEBUG_LOG("%p handle_client_resp %s", data, TSHttpEventNameLookup(event));

Review comment:
       When troubleshooting the TSVIO's these are nice to have available.




----------------------------------------------------------------
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] traeak commented on a change in pull request #6691: Slice plugin: self heal when asset etag/last-modified block mismatches

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



##########
File path: plugins/experimental/slice/client.cc
##########
@@ -119,15 +126,30 @@ handle_client_req(TSCont contp, TSEvent event, Data *const data)
 void
 handle_client_resp(TSCont contp, TSEvent event, Data *const data)
 {
-  DEBUG_LOG("%p handle_client_resp %s", data, TSHttpEventNameLookup(event));
+  // DEBUG_LOG("%p handle_client_resp %s", data, TSHttpEventNameLookup(event));

Review comment:
       When troubleshooting the TSVIO's these are nice to have available.  I deleted these lines but for future testing may have to bring these back in.




----------------------------------------------------------------
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] zwoop commented on pull request #6691: Slice plugin: self heal when asset etag/last-modified block mismatches

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


   Backported to 9.0.1 in #7435


----------------------------------------------------------------
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