Magento performance and hosting: Redis, Varnish and CDN

All articles
Development & Performance

Magento performance and hosting: Redis, Varnish and CDN

Magento speed drives conversions and SEO. Here is how to tune it with Varnish full page cache, Redis for cache and sessions, a CDN, production mode, OPcache, WebP images and the right hosting.

Magento performance and hosting: Redis, Varnish and CDN

A slow Magento costs sales. Speed directly affects your conversion rate and your Google Core Web Vitals, now a ranking signal: every extra tenth of a second on load time means abandoned carts and lost positions. The good news is that Magento already ships every tool you need to be fast — you just have to configure them well. Here is how.

Why speed matters

A fast store converts more, gets crawled better by search engines and delivers a smoother mobile experience. Working on server response time (TTFB), LCP and CLS is not a technical detail: it is marketing that moves revenue.

Full Page Cache with Varnish

Full Page Cache is the most powerful lever. Magento supports Varnish natively, serving HTML pages from memory without running PHP on every request:

  • TTFB cut from hundreds of milliseconds to a handful.
  • PHP servers freed from the load of cacheable pages.
  • Configured from the admin: Stores → Configuration → Full Page Cache → Varnish.

Redis for cache and sessions

Move the system cache and sessions to Redis: it is far faster than the filesystem or the database. Use separate instances (or databases) for the default cache, the full page cache and sessions, so you can invalidate selectively and avoid bottlenecks.

CDN for assets and images

A CDN distributes CSS, JavaScript and especially product images on nodes close to the user. The result: lower latency, less load on the origin server, and images delivered in the optimal format and size for each device.

Production mode and OPcache

In production always run in production mode (bin/magento deploy:mode:set production): compiled assets, no on-the-fly generation, precompiled DI. Then enable PHP OPcache to keep bytecode in memory and remove recompilation on every request.

Optimized images and WebP

Images are often the heaviest part of a page. Compress, resize and serve them as WebP: smaller files at the same quality, lower LCP and greener Core Web Vitals.

Indexes and cron

Keep indexes in Update by Schedule mode and make sure cron runs reliably: reindexing, sitemap generation, email sending and cache cleanup all depend on it. A stalled cron silently degrades both performance and functionality.

Choosing the right hosting

None of this pays off if the hosting is undersized. You need adequate resources (CPU, RAM, NVMe disks), MySQL 8.4 or MariaDB 11.4 LTS and OpenSearch for catalog search. An environment built for Magento is the difference between a store that handles peaks and one that crashes during sales. If you want a performance check or help sizing your infrastructure, the Shine Software team is here to help.

Michelangelo Turillo
Michelangelo Turillo
Shine Software

Founder di Shine Software. Da oltre 12 anni progetta e sviluppa e-commerce Magento con AI integrata, hosting gestito e soluzioni su misura per le PMI italiane ed estere.

My Cart
Consulting