Avoiding Nginx restart when rsyncing cache across machines
Quintin Par
quintinpar at gmail.com
Wed Sep 12 19:41:15 UTC 2018
Hi Maxim,
Thank you for this. Opened my eyes.
Not to sounds demanding, but do you have any examples (code) of proxy_store
bring used as a CDN. What’s most important to me in the initial cache
warming. I should be able to start a new machine with 30 GB of cache vs. a
cold start.
Thanks once again.
- Quintin
On Wed, Sep 12, 2018 at 7:46 AM Maxim Dounin <mdounin at mdounin.ru> wrote:
> Hello!
>
> On Tue, Sep 11, 2018 at 04:45:42PM -0700, Quintin Par wrote:
>
> > I run a mini CDN for a static site by having Nginx cache machines (in
> > different locations) in front of the origin and load balanced by
> Cloudflare.
> >
> > Periodically I run rsync pull to update the cache on each of these
> > machines. Works well, except that I realized I need to restart Nginx and
> > reload isn’t updating the cache in memory.
> >
> > Really want to avoid the restart. Is this possible? Or maybe I am doing
> > something wrong here.
>
> You are not expected to modify cache contents yourself. Doing so
> will likely cause various troubles - including not using the new
> files placed into the cache after it was loaded from the disk, not
> maintaining configured cache max_size and so on.
>
> If you want to control cache contents yourself by syncing data
> across machines, you may have better luck by using proxy_store
> and normal files instead.
>
> --
> Maxim Dounin
> http://mdounin.ru/
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20180912/60d38030/attachment.html>
More information about the nginx
mailing list