I am wondering if Nginx will ever support caching without buffering responses? Buffering the full response before sending the data out to client increases the first byte latency (aka TTFB). In a perfect world if nginx can stream the data to the cache file and to the client simultaneously that would solve the TTFB issues. From experience i know that squid follows this methodology. I am curious why Nginx went with the buffering approach.
You can make it even more efficient by using splice. splice upstream fd to disk and splice from disk to downstream fd.
Thanks for all the replies.