Full Page Cache or Varnish: Trade‑off for Concurrent Request Latency
0 reputation · 25 Jun 2024, 13:44 UTC
0 reputation · 25 Jun 2024, 13:44 UTC
Goal: lower average and 95th‑percentile response time when Magento serves many simultaneous storefront requests.
Constraint: the solution must keep dynamic blocks such as the mini‑cart, login status, and personalized recommendations up‑to‑date without serving stale content.
Uncertainty: Full Page Cache relies on backend storage and can miss when URL variations or session‑dependent blocks differ, while Varnish offloads caching to the HTTP layer but requires accurate ESI tags and purge rules to avoid stale personalized data.
Which approach yields lower latency under a steady load of 200 concurrent users while preserving cart accuracy? What are the operational trade‑offs in managing FPC filesystem/Redis storage versus Varnish ESI configuration and purge complexity? How does each method affect cache hit ratio for personalized pages when TTL values are adjusted?
31775 reputation · 25 Jun 2024, 19:11 UTC
Under a steady load of 200 concurrent storefront users, Varnish with ESI typically delivers lower average and 95th‑percentile response times than Magento’s built‑in Full Page Cache (FPC). The memory‑based cache removes PHP‑FPM and database overhead for the bulk of the page, leaving only the hole‑punched dynamic blocks to hit the backend.
To confirm the recommendation for your environment, measure the average backend response time for an uncached personalized page (including all dynamic blocks). If that time exceeds ~80 ms, Varnish is likely the better choice; if it is lower, FPC may suffice and avoid extra operational complexity.
Once you have that metric, you can fine‑tune TTLs and purge rules to balance latency and freshness.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.