Welcome! Log In Create A New Profile

Advanced

Re: Multiple nginx instances share same proxy cache storage

August 11, 2014 05:37AM
Robert Paprocki Wrote:
-------------------------------------------------------
> like rsyncing the cache contents between nodes thus would not work);
> are there any recommendations to achieve such a solution?

I would imagine a proxy location directive and location tag;

shared memory pool1 = nginx allocated and managed
shared memory pool2 = socket or tcp pool on a caching server elsewhere

The problem you have is speed and concurrency of requests, rsyncing a cache requires a specific tag which needs to be respected by each instance using it or you will have a battle between instances.

A better idea would be a database with a persistent connection, in memory cached again to avoid duplicate queries.
ea. use the database for a central repository of cached items and local memory to avoid hitting the database more then once for each item. No disk-IO would be involved so it should also be non-blocking.

---
nginx for Windows http://nginx-win.ecsds.eu/
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: 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