According to recent data from the Adobe Digital Economy Index, online shopping has now become the primary mode of commerce. In April 2020, U.S. e-commerce saw a 49% rise in daily sales compared with early March—before “stay at home” measures were introduced. Online grocery shopping has seen the biggest demand, with a 110% boost in sales figures for the month of April. Electronics sales were also up 58%, and purchases of books have doubled.
This trend has been mirrored throughout Europe. Since social distancing was introduced, 57% of European consumers have begun to shop online more—with about 30% spending more on virtual experiences. And it seems that essentials and books have become the key drivers of online shopping.
Statistics show that where loading time is prolonged by just one second, there’s a 7% reduction in conversion. This has a knock-on effect for site ranking since Google’s search engine sees that visitors haven’t lingered on a page for long—adjusting the website’s ranking accordingly.
While it’s considered one of the leading e-commerce platforms, Magento 2 has also gained a reputation for performance dips, caused by its heavyweight structure. If your e-store is powered by Magento 2, minimising the risk of a slow load speed is vital to your success and, ultimately, your bottom line. So, we’ve come up with easy-to-deploy solutions that can help you get the best performance from your Magento platform. We’ll cover this in our next article.
For now, we’ll offer some high-level insight on how to optimise Magento 2 performance via caching.
If you have a small e-commerce store with low traffic, Magento’s out-of-the-box offering provides a perfect solution. However, if you’re dealing with a large number of products and orders, one way to significantly enhance performance is to manage the cache more efficiently.
Let’s take a quick look at what Magento offers, out-of-the-box:
Storing the cache in a database is an alternative to Magento 2’s default functionality. But this isn’t an ideal solution and even Magento developers don’t recommend it. Magento has many functionality issues as well as acceleration tools and, when performance needs to be improved, caching is often the first step. So here’s how to do it.
When it comes to choosing a caching system, we recommend the following options:
Memcached is a cache system which uses random-access memory (RAM). It is simple and easy to work with and, as such, it’s quite popular. This demand has influenced the creation of various tools to simplify the use of cached data.
Moving caches from slow memory in the file system to fast RAM results in significantly improved performance, but it’s still not necessarily the best solution. Memcached has its own imperfections when used in conjunction with Magento—for example, Memcached doesn’t support tags.
Redis offers rapid data storage within RAM, and it’s this speed which is one of its key advantages. Redis is very fast and, unlike systems such as Memcached, it’s able to handle tags and store data of different types—not just string. Configuring Redis to work with Magento is as straightforward as changing the configs in env.php. As well as this, Redis allows you to keep sessions, Magento configuration cache, and Magento full-page cache.
Due to its popularity, Redis has many interfaces to use with its database—such as phpRedisAdmin.
Another alternative is Varnish—an HTTP accelerator. It is also able to hold caches in RAM and offers a massive performance boost while reducing server load. One of the biggest benefits of choosing this over another system is that Magento natively supports Varnish, and allows you to perform full-page caching directly from the Magento admin panel. What differentiates it from Redis is that Varnish caches the page after the first download, and can then retrieve the page from the cache and return the full HTML page code.
Whichever caching system you choose, using a Cache Warmer can effectively improve Magneto’s performance. Magento has ready modules for updating caches. They monitor the caches’ status and, when they’re cleared or missing, a robot opens the pages and fills the caches. So, when a user enters a page, he/she will receive the cached data as soon as they request it.
A sluggish website impacts your conversion rate and overall success. So increasing your site’s loading speed—while it may prove a challenge—will have a positive effect on performance.
If you’re using Magento 2, one of the first ways to enhance its performance is to use a caching system. Default Magento caching doesn’t perform well with a high load, which is why it may be beneficial to choose Varnish or Redis. It’s worth noting the differences between the two, and how they can complement each other. Varnish comes in handy for full-page caching and Redis for backend caches and sessions, for example. Using a Cache Warmer module can also help improve Magneto’s performance, regardless of which caching system you choose.
As you may have noticed from the title, this is just the first part of the series. Check out our article on how to optimise Magento 2 performance via disabled modules for more expert insights.
In the meantime, if you’re looking for ways to improve your website’s performance and boost customer engagement, we will be happy to discuss your needs. Our team at ELEKS has decades of experience providing custom retail software solutions to businesses globally. So don't hesitate to contact us for expert advice.
The breadth of knowledge and understanding that ELEKS has within its walls allows us to leverage that expertise to make superior deliverables for our customers. When you work with ELEKS, you are working with the top 1% of the aptitude and engineering excellence of the whole country.
Right from the start, we really liked ELEKS’ commitment and engagement. They came to us with their best people to try to understand our context, our business idea, and developed the first prototype with us. They were very professional and very customer oriented. I think, without ELEKS it probably would not have been possible to have such a successful product in such a short period of time.
ELEKS has been involved in the development of a number of our consumer-facing websites and mobile applications that allow our customers to easily track their shipments, get the information they need as well as stay in touch with us. We’ve appreciated the level of ELEKS’ expertise, responsiveness and attention to details.