Varnish
Varnish is recommended for Full Page Caching with Magento2. Website performance is greatly increased when using Varnish.
Traffic flow on a single server with Varnish is typically:
- Port 80 (Varnish) -> Port 8080 (NGINX) -> PHP-FPM
- Port 443 (NGINX) - Port 80 (Varnish) -> Port 8080 (NGINX) -> PHP-FPM
- Varnish
- Install Varnish
- Example
VCL - Configuration test
- Start Varnish
- Reload Varnish
- Restart Varnish
- Version check
Varnishlog- Generate VCL in Magento 2
- Set Varnish for FPC in Magento 2
- Health check
- Cache static files
- Too many restarts
- HIT/MISS headers
cacheable="false"- Exclude domain from cache
- Exclude URI from cache
- HTTP -> HTTPS redirect
- Custom 503 error page
- Load balancing
- Purge cache
- SSL termination
- SSL offloading
- Default VCL config