HTTP Data Buffering-- Look-a-Head
Carey Gister
careygister at outlook.com
Mon Apr 8 16:32:35 UTC 2019
Hi,
I have an interesting requirement. I am reading large files (on the order of 1 GB+) for connected clients. The clients may view part of the data and then cancel it, so I don't want to issue a request for an return the entire document. What I am interested in doing is fetching part pf the document, say 6 MB, and returning it. Then, I want to pre-fetch another 6 MB slice and hold it until/if the client requests it. If the client requests it, I want to return it and pre-fetch another slice.
The slice module reads the entire document and returns it in slices. Unfortunately, this means I'm reading far more of the document than most clients will read.
Is there existing code that solves this problem, or something close to it?
It seems to me that in order to implement this solution I have to know how fast data is being consumed so I can know if I need to pre-fetch another slice. If there isn't an existing solution, what is the best way to know how fast data is being consumed?
Thank you in advance,
Carey Gister
415-310-5304
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20190408/caef3457/attachment.html>
More information about the nginx-devel
mailing list