Slice Look Ahead

careygister careygister at outlook.com
Sun Mar 10 17:19:35 UTC 2019


Hi, 

I'm interested in extending the slice module to look ahead one slice. I want
to add the slice to the cache when it completes and when requested by the
user look ahead one more slice. The intention is to improve client-side
performance because I will alway have a copy of the next slice ready to
deliver and I won't have to request it from the upstream server when the
client requests it. 

I've looked over the code for the slice and caching modules and I think a
possible implementation would be to issue a request from the slice module
asynchronously. Only, I can't figure out how to deliver an asynchronous
subrequest. It looks to me like the parent request waits for the subrequest
to complete before returning to the caller. Also, in the caching module I
don't see the hook for issuing a request when a cache hit occurs. 

Can anyone give me some references to similar code or to documentation in
the manuals that solves a related problem? 

Thanks, 

Carey




--
Sent from: http://nginx.2469901.n2.nabble.com/


More information about the nginx mailing list