shukitchan commented on PR #309:
URL: 
https://github.com/apache/trafficserver-ingress-controller/pull/309#issuecomment-3396023619

   Actually I think the real problem is that the original design of the 
connect_redis.lua lua script is not taking the cache into consideration.
   
   In this case, the same incoming URL will have equal opportunity to route to 
one of the 2 pods. And if the first response is to be cached, subsequent 
requests should be serving from cache and should not consult with the routing 
decision again.
   
   I think we can call ts.http.set_cache_url inside the lua script to fix this 
problem.
   See the description of the call here - 
https://docs.trafficserver.apache.org/en/latest/admin-guide/plugins/lua.en.html#ts-http-set-cache-url
   
   Basically in do_global_read_request function of connect_redis.lua, at the 
beginning we can call ts.client_request.get_pristine_url to retrieve the url 
and then call ts.http.set_cache_url at the very end of the function to properly 
set the cache key to the incoming URL.


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to