Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

futurefuture's avatar

NGINX Page Caching With Load Balancer

Hello!

Was looking to setup NGINX server page caching for my application. From what I can find, this package seems to do the trick: https://github.com/JosephSilber/page-cache

However, my setup is using a load balancer on top of my application, cache and worker servers.

From what I understand, setting up NGINX page caching using a package such as this would only cache the pages directly on an individual NGINX server (whichever received the initial request). I have 3 questions about this and any help would be greatly appreciated:

  1. Am I wrong in thinking this? Should I maybe be writing the config on the Load Balancer instead?
  2. If not, would this be a job for my REDIS cache?
  3. If not, does anyone else have any recommended solutions for a Load Balancer setup?

Thanks in advance!

0 likes
0 replies

Please or to participate in this conversation.