Welcome! Log In Create A New Profile

Advanced

Re: Multiple nginx instances share same proxy cache storage

December 25, 2014 08:02AM
Hi,


> Hello!
>
> On Sun, Aug 10, 2014 at 05:24:04PM -0700, Robert Paprocki wrote:
>
> > Any options then to support an architecture with multiple nginx
> > nodes sharing or distributing a proxy cache between them? i.e.,
> > a HAProxy machine load balances to several nginx nodes (for
> > failover reasons), and each of these nodes handles http proxy +
> > proxy cache for a remote origin? If nginx handles cache info in
> > memory, it seems that multiple instances could not be used to
> > maintain the same cache info (something like rsyncing the cache
> > contents between nodes thus would not work); are there any
> > recommendations to achieve such a solution?
>
> Distinct caches will be best from failover point of view.
>
> To maximize cache effeciency, you may consider using URI-based
> hashing to distribute requests between cache nodes.
>
> --
> Maxim Dounin
> http://nginx.org/


I wonder if it would hurt to make nginx load cache metadata from file as a fallback only if there's no entry in the keys_zone. If this would be a param for proxy_cache_path we could build a distributed cache cluster by simply copying cache files to other nodes. Making this a param would not hut performance if you don't want this behavior. The functionality is already there, because nginx loads metadata from files on startup.

Is this a valid feature request or does no one care aboout clustering nginx caches?

--
Thomas
Subject Author Posted

Multiple nginx instances share same proxy cache storage

badtzhou August 04, 2014 07:42PM

Re: Multiple nginx instances share same proxy cache storage

Maxim Dounin August 04, 2014 08:50PM

Re: Multiple nginx instances share same proxy cache storage

Robert Paprocki August 10, 2014 08:26PM

Re: Multiple nginx instances share same proxy cache storage

itpp2012 August 11, 2014 05:37AM

Re: Multiple nginx instances share same proxy cache storage

Maxim Dounin August 11, 2014 06:20AM

Re: Multiple nginx instances share same proxy cache storage

ThomasLohner December 25, 2014 08:02AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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