Welcome! Log In Create A New Profile

Advanced

nginx subrequests / background operations

Ameir Abdeldayem
June 06, 2014 12:58AM
Hello,

I am investigating the complexity of allowing for an additional parameter,
"expired", to proxy_cache_use_stale.

Instead of a request hitting the backend with an $upstream_cache_status of
EXPIRED and making the client wait for the request to complete, the client
would instead be given a stale version of that cached entry, and that entry
would be updated in the background.

The directive would look like:
proxy_cache_use_stale expired updating error ...;

I was looking into ngx_http_subrequest() as a potential route to take, but
it looks like it's blocking (as in the client would have to wait for it to
complete). I also looked at post_action, but it's unclear on whether it's
blocking or not, and whether it'd work for this case.

Could you advise me on the best route to take here?

Varnish 4 supports this feature ("grace mode") and I'm getting some
pressure to switch solely because of this feature, but because I love nginx
so much, I figured I'd take a stab at getting this feature in.

Any tips would be well-appreciated.

Thanks!
-Ameir
_______________________________________________
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 838 June 06, 2014 12:58AM

Re: nginx subrequests / background operations

Maxim Dounin 361 June 06, 2014 08:18AM

RE: nginx subrequests / background operations

Ameir Abdeldayem 353 June 07, 2014 01:38AM

Re: nginx subrequests / background operations

Maxim Dounin 357 June 08, 2014 03:14PM

RE: nginx subrequests / background operations

bbarker5025 . 396 June 08, 2014 04:02PM



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

Online Users

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