Chapter 3. Enabling Performance in Magento 2

In this chapter, we will cover the basic tasks related to optimizing your performance in Magento 2. You will learn the following recipes:

  • Configuring Redis for backend cache
  • Configuring Memcached for session caching
  • Configuring Varnish as a Full Page Cache
  • Configuring Magento 2 with CloudFlare
  • Configuring optimized images in Magento 2
  • Configuring Magento 2 with HTTP/2
  • Configuring Magento 2 performance testing

Introduction

This chapter explains one of the most important elements of Magento. From the early Magento days, performance has been a hard topic to cover. Many setups out there in the e-commerce world are performance-great, but most of the time, the majority are having issues. Magento 1 may not be the best performance platform out there.

However, now we have Magento 2, a brand new platform designed for performance. From the very first day, the main Magento developers focused on a better framework and the outcome is great. According to the latest information, Magento focused on a Google PageSpeed ranking of 90% or more.

In this chapter, we will dive in deeper on how to configure Redis caching and Memcached sessions. By default, Magento 2 supports Varnish, and we will manage all of the steps on how to set it up.

Serving the correct catalog or product images is very important, and will save lots of bandwidth on a desktop but most of all on a mobile device, which will have a better user experience.

As we mentioned in Chapter 1, Installing Magento 2 on Apache and NGINX, the new HTTP/2 protocol is a very new important element in the web server configuration. We will set up a full-force HTTP/2 configuration, including SSL.

For a high-demanding Magento 2 website serving customers all over the globe, we introduce CloudFlare, which is a CDN provider optimized for Magento.

Without performance testing, Magento 2 will not perform well. You will learn how to create a company-like profile, including websites, stores, catalogs, products, orders, and much more.

Tip

Throughout this recipe, you can pick your own preferred hosting setup as we did in Chapter 1, Installing Magento 2 on Apache and NGINX. We will be using an NGINX-based setup. The Apache setup is pretty straightforward; when needed, we will address specified configuration settings when they occur.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.176.194