Welcome! Log In Create A New Profile

Advanced

Re: nginx subrequests / background operations

Maxim Dounin
June 08, 2014 03:14PM
Hello!

On Sat, Jun 07, 2014 at 01:36:59AM -0400, Ameir Abdeldayem wrote:

> Hello Maxim,
>
> Thanks for your feedback. Yes, "proxy_cache_use_stale updating" does do a
> great job, but "the first request" is the first request per TTL, which
> relates to the problem we're facing.
>
> We run some high-profile sites, oftentimes with low TTLs (1m or so). The
> queries we run on the backend are very complex and time-consuming, and
> oftentimes take on the order of 10s to complete. Because of the low TTL,
> although most users get immediate responses, the user who makes the request
> when the entry is EXPIRED has to suffer.

From the description it looks like the real problem is that your
backend response time is inadequate. Instead of trying to use
nginx cache to mitigate this, you may want to focus on the real
problem instead, and make backend to respond in a reasonable time.

Following the "nginx mitigation" approach, a solution you may want to
consider is a helper script to use proxy_cache_bypass to update
cached items before they expire.

--
Maxim Dounin
http://nginx.org/

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

nginx subrequests / background operations

Ameir Abdeldayem 844 June 06, 2014 12:58AM

Re: nginx subrequests / background operations

Maxim Dounin 363 June 06, 2014 08:18AM

RE: nginx subrequests / background operations

Ameir Abdeldayem 358 June 07, 2014 01:38AM

Re: nginx subrequests / background operations

Maxim Dounin 359 June 08, 2014 03:14PM

RE: nginx subrequests / background operations

bbarker5025 . 399 June 08, 2014 04:02PM



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

Online Users

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