Scaling nginx caching storage
Lucas Rolff
lucas at lucasrolff.com
Sat Sep 23 09:18:53 UTC 2017
> is there any way to share a cache directory between two nginx instances ?
> If it can't be done what do you think is the best way to go when we need to scale the nginx caching storage ?
One is about using same storage for two nginx instances, the other one is scaling the nginx cache storage.
I believe it’s two different things.
There’s nothing that prevents you from having two nginx instances reading from the same cache storage – however you will get into scenarios where if you try to write from both machines (Let’s say it tries to cache the same file on both nginx instances), you might have some issues.
Why exactly would you need two instances to share the same storage?
And what scale do you mean by scaling the nginx caching storage?
Currently there’s really only a limit to your disk size and the size of your keys_zone – if you have 50 terabytes of storage, just set the keys_zone size to be big enough to contain the amount of files you wanna manage (you can store about 8000 files per 1 megabyte).
From: nginx <nginx-bounces at nginx.org> on behalf of Amir Keshavarz <amirkekh at gmail.com>
Reply-To: "nginx at nginx.org" <nginx at nginx.org>
Date: Saturday, 23 September 2017 at 10.58
To: "nginx at nginx.org" <nginx at nginx.org>
Subject: Scaling nginx caching storage
Hello,
Since nginx stores some cache metadata in memory , is there any way to share a cache directory between two nginx instances ?
If it can't be done what do you think is the best way to go when we need to scale the nginx caching storage ?
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20170923/be5c4825/attachment.html>
More information about the nginx
mailing list