Welcome! Log In Create A New Profile

Advanced

[PATCH] Upstream: fix the cache duration calculation

Florent Le Coz
November 14, 2013 10:36AM
Hello,

We have a "chain" of nginx servers, like this:
A (nginx) -> B (nginx) -> C (anything)

B being A’s upstream, and C being B’s upstream

We ran into an issue where the files were being cached for a too long
duration. For example if we want to cache our files in this chain for
10 seconds, it could happen that the file actually exist for up to 30
seconds, because when B retrieves the file from C, even if it’s almost
expired on C, B will cache it for 10 seconds. Same thing if A retrieves
the file cached by B.

To fix this issue, nginx needs to properly take into account the Age
header provided by its upstream. This is what the attached patch does.

A subsequent patch will by provided soon, where the Age provided by
nginx actually indicates the age of the file in nginx’s cache, instead
of the age that was provided by its upstream.

Regards,

--
Florent Le Coz
Smartjog

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

[PATCH] Upstream: fix the cache duration calculation

Florent Le Coz 787 November 14, 2013 10:36AM

Re: [PATCH] Upstream: fix the cache duration calculation

Maxim Dounin 319 November 14, 2013 12:16PM

Re: [PATCH] Upstream: fix the cache duration calculation

Florent Le Coz 330 November 14, 2013 12:46PM

Re: [PATCH] Upstream: fix the cache duration calculation

Maxim Dounin 320 November 15, 2013 07:46AM

Re: [PATCH] Upstream: fix the cache duration calculation

Florent Le Coz 392 November 15, 2013 10:36AM

Re: [PATCH] Upstream: fix the cache duration calculation

Maxim Dounin 326 November 15, 2013 11:46AM

Re: [PATCH] Upstream: fix the cache duration calculation

Florent Le Coz 353 November 15, 2013 11:54AM



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

Online Users

Guests: 153
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready