jmarantz commented on issue #1679: pagespeed with load balancer (nginx) and front-end (apache) URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1679#issuecomment-583876427 Yes, best practice is to use a local shared-memory on each server, with a shared redis/memcached backend. In that scenario, the local shared-memory cache will store metadata, which tells pagespeed things like: "if you see <img src="foo.png"></img> in the HTML, and the accept headers include image/webp, then the optimized URL to map that to is foo.png.pagespeed.ic.HASH_CODE.webp". That mapping can occur local to the apache/nginx server, without having to incur a round-trip to your cache server. That's very important because it enables delivering the HTML to the browser as quickly as possible, so that the browser can initiate the requests for the images. The mapping algorithms that PageSpeed use from origin URL to optimized URL are deterministic, as long as each server is running the same version of pagespeed with the same options. So there's no harm in having distinct L1 caches and a shared L2. The same optimization decisions will be made, and the same hash-codes will be computed. On Sun, Feb 9, 2020 at 11:45 AM salvoaranzulla <notificati...@github.com> wrote: > @jmarantz <https://github.com/jmarantz> Hi Josh, > > Thanks. So even if I use multi-server (4 servers) with same pagespeed > configuration, do you suggest o me to use a local shared-memory cache for > each server? > > Salvatore > > — > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub > <https://github.com/apache/incubator-pagespeed-ngx/issues/1679?email_source=notifications&email_token=AAO2IPMU7E6SPGAQEMPZPS3RCAXLVA5CNFSM4KQ4JUGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELGRSGY#issuecomment-583866651>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AAO2IPM2446APRCTXSEHCELRCAXLVANCNFSM4KQ4JUGA> > . >
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services