Welcome! Log In Create A New Profile

Advanced

Re: fastcgi cache use stale "updating" — improvement suggestion

September 10, 2014 03:27PM
Maxim Dounin Wrote:
> nginx needs a client request to be able to request a
> resource from a backend and to save it to the cache.

I'm afraid my explanation wasn't clear enough.
There's no need to make nginx able to make requests to fastcgi on it's own initiative.

How it works today:
A client makes a request. Nginx sees the cache has expired and issues a request to fastcgi. It takes some time and client is patiently *waiting*. Finally, after nginx gets a response from fastcgi app, it stores it in cache and sends it to the client.

How it can be improved:
A client makes a request. Nginx sees the cache has expired and issues a request to fastcgi. But nginx doesn't wait for fastcgi response, and *immediately* responds to the client with *stale* cache contents (if it exists). Client is like "whoa, that was fast!". And later, eventually, nginx gets a response from fastcgi app and updates cache.
Subject Author Posted

Re: fastcgi cache use stale "updating" — improvement suggestion

Maxim Dounin September 10, 2014 01:02PM

Re: fastcgi cache use stale "updating" — improvement suggestion

nanochelandro September 10, 2014 03:27PM

Re: fastcgi cache use stale "updating" — improvement suggestion

Maxim Dounin September 11, 2014 09:44AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 124
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready