Welcome! Log In Create A New Profile

Advanced

Re: proxy_cache

Richard Kearsley
April 25, 2011 04:14PM
Ideal situation is initiate one request to back-end then for each additional request start sending the (still incomplete) cached file at the same rate it's being downloaded into the cache (I cache after just 1 hit)

I'm talking video files 400-500mb crossing the Atlantic.... Not fast at all and can get seriously congested once it starts getting the same file over and over in this "first cache" syndrome

Anything I can do to help/test please let me know :)
Keep up the good work

Sent from my iPhone

On 25 Apr 2011, at 19:59, Ryan Malayter <malayter@gmail.com> wrote:

> On Sun, Apr 24, 2011 at 9:22 PM, Richard Kearsley
> <Richard.Kearsley@m247.com> wrote:
>> Thanks, I already set "proxy_cache_use_stale updating"
>> But what if the file is completely new..? there is no stale file to serve
>
> Ah, I see... the first request for a new file would put it into the
> updating state, but there would be no stale version to serve.
>
> I'm not sure what happens in that case, but I would suspect that all
> of those requests go to the back end. This should be a very
> short-lived condition though. In the majority of the cases we're
> talking milliseconds, unless the files are really large or the
> back-end is really slow.
>
> Say you had a 50 MB video file and your back-end was something like
> Amazon S3... I could see many many requests for that file coming in at
> the same time the first was still processing. I'm not sure what the
> best thing to do in that case would be.
>
> The options, I think, would be:
> 1) return a 404 (or some temporary error code) until the cache is
> primed (that doesn't seem like good default behavior)
> 2) block all other requests until the first is finished (also seems
> problematic, especially if the first request is taking forever)
> 3) pass all requests to the back-end until there is a valid cache entry
>
> I suspect nginx chooses option #3. Are you saying that you want to do
> #2? Or something else entirely?
>
> Varnish seems to do #2 by default:
> http://www.varnish-cache.org/docs/2.1/tutorial/handling_misbehaving_servers.html
>
> --
> RPM
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://nginx.org/mailman/listinfo/nginx

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

proxy_cache

Richard Kearsley April 24, 2011 11:00AM

RE: proxy_cache

Richard Kearsley April 24, 2011 10:46PM

Re: proxy_cache

Maxim Dounin April 25, 2011 02:58PM

Re: proxy_cache

Ryan Malayter April 25, 2011 03:00PM

Re: proxy_cache

Richard Kearsley April 25, 2011 04:14PM

Re: proxy_cache

Ryan Malayter April 26, 2011 10:26AM

RE: proxy_cache

Richard Kearsley April 26, 2011 10:30AM

Re: proxy_cache

António P. P. Almeida April 26, 2011 11:22AM

RE: proxy_cache

Richard Kearsley April 29, 2011 09:04AM

Re: proxy_cache

Ryan Malayter April 24, 2011 10:46PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 224
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready