Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable immediate NGINX proxy cache streaming #167

Open
akarasulu opened this issue Dec 9, 2017 · 0 comments
Open

Enable immediate NGINX proxy cache streaming #167

akarasulu opened this issue Dec 9, 2017 · 0 comments
Assignees

Comments

@akarasulu
Copy link
Contributor

akarasulu commented Dec 9, 2017

Problem

Big files are a big problem. In the following configuration, on a cache MISS the client has to wait until the cache node pulls down the whole file from the upstream server:

[client] <-> [cache node] <-> [upstream origin]

We will be referencing vagrant files in our CDN. These files are very large. It is important to have the cache nodes returning something on a cache miss even before the whole file is pulled down from the upstream server.

Possible Solutions

There are a number of NGINX modules and their options we SHOULD consider. Most notably we need to look at the slice plugin.

Also, we should probably use a cache lock to prevent multiple clients from requesting the same file. This makes the proxy start downloading from the upstream several times and slows everything down. Here's a page that talks about this: https://www.nginx.com/blog/smart-efficient-byte-range-caching-nginx/

Also, consider changing the use_temp_path option to the proxy_cache module to off. Find out where NGINX puts temp files. In a LEDE router that I installed NGINX on NGINX pushed to /tmp and killed the router. Need to turn this off I think.

@akarasulu akarasulu changed the title Consider using the use_temp_path=off option to proxy cache Use the use_temp_path=off option to NGINX proxy cache Dec 9, 2017
@akarasulu akarasulu changed the title Use the use_temp_path=off option to NGINX proxy cache Enable immediate NGINX proxy cache streaming Dec 10, 2017
@emli emli removed their assignment May 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants