About UsContact

Problem Solved: Magento 2 Deal with Large Media Content

By Jimmy Hung
Published in Magento 2
December 09, 2021
3 min read
Problem Solved: Magento 2 Deal with Large Media Content

Magento 2 has been a revolutionary platform for ecommerce developers. It is on the cutting edge of technology and allows businesses to grow their sales with great ease. However, one issue that many have faced is the lack of support for large media content in Magento 2 stores. The problem was finally solved when they released a new module called Remote Storage which includes all the features needed to manage large media content in Magento 2 stores.

Problem

  1. Your store has large media content and it affects to your site performance.
  2. You have multiple servers (or AWS EC2 instances) for 1 Magento 2 System.

Solutions

  1. For Magento 2.4.2 and later version: Using AWS S3 to store media contents with Magento Remote Storage module.
  2. For Older Magento version: Using AWS EFS to store media contents.

Using AWS S3 to store media contents.

In case you are using Magento 2.4.2 or later versions, AWS S3 is the best option for storage because it will provide an additional feature called Remote Storage that allows users to connect their server with one of these buckets located out in the cloud.

Here are reasons you need to use AWS S3 are:

  1. S3 is the perfect storage for your data and can store any type of file, so you’ll have no problem with managing backing up or moving things around as needed.

  2. S3 is scalable and at a lower cost than most dedicated servers.

  3. Block-level storage can increase performance in some use cases if implemented correctly.

  4. Doing many small uploads (< 1MB per request) instead of a few large ones is preferable for bandwidth usage. This can save you money when using cloud storage services based on outbound transfer usage such as AWS S3

  5. AWS S3 now guarantees 99.9% availability.

  6. The file system’s metadata typically spread across many directories and files which slows access times (most common performance problem)

  7. With Amazon Web Services (AWS) S3 integration, you can now take advantage of their Cloudfront CDN service along with an in-house storage solution.

  8. With the release of Magento 2.4.2 and later versions, users can now take advantage of Amazon Web Services (AWS) S3 integration which will allow them to store any type of image on their reliable server network! We had another blog post about this too if you want more information.

Using AWS EFS to store media contents.

AWS Elastic File System (EFS) is a service that makes it easy to create and manage file shares between servers. EFS can be used to store Magento 2 images outside of the webroot, which is recommended when using multiple servers.

The most common way that I see people solve this issue is by using NFS storage: it’s fast and works well enough most of the time, but it can be tricky to set up and manage. This is where AWS EFS comes in: it provides a simple, scalable way to share files between servers without the need for NFS. Because Magento 2 relies so heavily on images, this can be a huge timesaver - especially if you’re working with a team of developers.

NFS (Network File System) is a protocol for sharing files between systems. It allows several clients to read and write to the same file at the same time, and it’s fast and easy to set up and use. EFS does similar work with less trouble than NFS, but if we still want to use NFS we will have to install and configure an NFS server on each of our web nodes which can be cumbersome. For this reason I recommend using EFS instead of installing an entire third party system such as NFS or Gluster FS .

For Magento 2 development, EFS offers a number of benefits: it reduces the complexity of new servers since they can share the image folder, it reduces problems that can arise from a lack of file system symmetry by allowing images on multiple servers to be updated simultaneously, and it makes the configuration of a team environment simpler.

If you’re looking for an easy way to keep your images folder accessible regardless of your server setup, AWS EFS is definitely worth considering.

Conclusion

Unfortunately, there is no easy solution to the problem of large media content and its affect on site performance. We can help you find a way that works for your business by evaluating the needs, resources, and capabilities in our team. The good news is we’re here to help! Contact us today with any questions or concerns about how we may be able to solve this issue for you in Magento 2 Deal with Large Media Content.


Tags

AWS S3AWS EFSCloud ArchitectureMagento 2
Previous Article
7 Ways to Improve the User Experience of Your Fashion eCommerce Website
Jimmy Hung

Jimmy Hung

Free Software Enthusiast

Topics

JAMStack Development
Progressive Web App
Cloud Architecture
Magento 2

Related Posts

Magento 2.4.2 New Features: Remote Storage
July 12, 2021
4 min
© 2022, All Rights Reserved.

About Us

Social Media