Welcome! Log In Create A New Profile

Advanced

Can NGINX cache metadata get updated automatically, if file is added through backdoor by another NGINX proxy-cache?

September 29, 2017 05:00AM
Hi,

I have a use-case, where NGINX (say NGINX-process-1) is set up as a reverse proxy, with caching enabled (say in /mnt/disk2/pubRoot, with zone name "cacheA"). However, I have another NGINX (say NGINX-Process-B) which also runs in parallel, and caches its content in (/mnt/disk2/frontstore, with zone name "cacheB"). Additionally, there is another application which monitors this "frontstore", and copies its content to "pubRoot".

So, effectively, any content that NGINX-B caches in frontstore gets available in the cache-path which is configured for NGINX-A. However, NGINX-A cannot get it as HIT when it receives a request, as its metadata (zoneA) does not have the information, as it didn't cache it there in the first place.

Is there a mechanism by which NGINX-A cache lookup can get a HIT in such a case?

A work-around which I can think is, if NGINX-A is restarted, it will build its cache based on available files in its cache-path. This way, it will get its metadata populated with the file in pubRoot. Then on, a new request may result in a cache-HIT.

Thanks
Rajesh
Subject Author Posted

Can NGINX cache metadata get updated automatically, if file is added through backdoor by another NGINX proxy-cache?

rnmx18 September 29, 2017 05:00AM

Re: Can NGINX cache metadata get updated automatically, if file is added through backdoor by another NGINX proxy-cache?

Maxim Dounin September 29, 2017 09:18AM

Re: Can NGINX cache metadata get updated automatically, if file is added through backdoor by another NGINX proxy-cache?

rnmx18 September 29, 2017 04:33PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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