António P. P. Almeida
December 11, 2011 07:10PM
On 11 Dez 2011 16h01 WET, mdounin@mdounin.ru wrote:

Hello Maxim,

> Hello!
>
> Here are patch series which addresses several issues in cache
> (first 3 patches), and adds cache lock support (last 2).
>
> I'm planning to commit first 3 patches shortly, cache lock patches
> will remain experimental for a while. Review and testing
> appreciated.

I will. If I understood correctly the later two patches implement a
locking mechanism so that if /foobar is not cached and there are 5
requests for foobar in time interval below the cache lock timeout then
only the first request goes upstream the other requests are queued and
are served up when the upstream returns a response.

Example:

location /foobar {

# usual proxy cache stuff...

proxy_cache_lock on;
proxy_cache_lock_timeout 500; # the default, can be tweaked
proxy_pass http://my_upstream;
}

1. Request for /foobar comes in at t=0

2. Additional request for /foobar comes in at t=200ms

3. Additional request for /foobar comes in at t=220ms

Requests 2 and 3 are queued by the cache manager. Request 1 is
forwarded upstream. When a response arrives, requests 2 and 3 are
served.

For the moment the cache entries that are updating will use the
current 'proxy_cache_use_stale updating' setting.

Thanks,
--- appa

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

[PATCH 0 of 5] cache patches

Maxim Dounin 1807 December 11, 2011 10:06AM

[PATCH 1 of 5] Cache: obsolete code removed

Maxim Dounin 734 December 11, 2011 10:06AM

[PATCH 2 of 5] Cache: handling of cache files with long headers

Maxim Dounin 916 December 11, 2011 10:06AM

[PATCH 3 of 5] Cache: only complain on long locked entries

Maxim Dounin 919 December 11, 2011 10:06AM

[PATCH 4 of 5] Cache locks initial implementation

Maxim Dounin 883 December 11, 2011 10:06AM

[PATCH 5 of 5] Cache lock support for fastcgi, scgi, uwsgi

Maxim Dounin 732 December 11, 2011 10:08AM

Re: [PATCH 0 of 5] cache patches

fanboy 996 December 11, 2011 07:00PM

Re: [PATCH 0 of 5] cache patches

Maxim Dounin 792 December 12, 2011 04:54AM

Re: [PATCH 0 of 5] cache patches

António P. P. Almeida 770 December 11, 2011 07:10PM

Re: [PATCH 0 of 5] cache patches

Maxim Dounin 742 December 12, 2011 05:02AM

Re: [PATCH 0 of 5] cache patches

António P. P. Almeida 719 December 12, 2011 05:28AM

Re: [PATCH 0 of 5] cache patches

Maxim Dounin 778 December 12, 2011 05:36AM

Re: [PATCH 0 of 5] cache patches

António P. P. Almeida 1044 December 13, 2011 02:42PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 123
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