eCommerce Development

Using Nginx To Improve Magento Site Speed

Jul 26, 2012   •   2 Min Read

Traditionally, discussions about performance eCommerce optimizations are about code refactoring, database design, and other application-specific tweaks. However, evaluating your infrastructure from one level higher can be as equally important in the ability to serve your customers.

One of the key pieces of your overall environment is your web server – the software that handles the connection from a visitor and passes it along to the Magento design platform. You may already be familiar with two of the biggest names: IIS and Apache. Because Apache is installed by default in most Linux-based installs, it’s also used as the default choice in running much of the web’s content.

But many of Apache’s strengths – its robust feature set, with the flexibility to use it with nearly every web-based technology – are also its biggest weaknesses; all of those features, while nice, can contribute to what’s known as software “bloat”. The desire for faster and more streamlined services has made way for other choices that may help increase your user’s experience.

Nginx (pronounced “Engine-X”) is one such platform rising in popularity. Its goal is to provide the highest concurrency (number of simultaneous connections/users) with the lowest resource footprint (CPU and Memory usage). Simply put, it can help you serve pages to more customers in relatively less time.

One way Nginx achieves this is by doing as little as possible. By that, I mean the webserver is there to simply handle the request. The bulk of the work is passed off directly to a pool of waiting PHP processes (if you‘ve configured PHP with the built-in “FPM” module), which ends up reducing a lot of overhead. Less webserver overhead means more resources available to PHP, which is where 80% of the work needed to power your Magento design comes from.

Of course, where there are benefits, there are drawbacks. Or really, just one perceived ‘drawback’ – Nginx doesn’t support Apache-style .htaccess control files. The reasoning is simple enough: having to check for and parse the overrides gives a relative hit in performance. By pre-defining your rewrites in the webserver configuration files, Nginx can know immediately how to handle the request.

What does all of this have to do with Magento development? While it’s certainly not Magento-specific, it still directly affects what you’re trying to do – provide a fast, stable storefront in which to serve your customers. Many benchmarks have consistently put Nginx ahead of Apache in terms of performance and scalability. Even Magento's website (now Adobe Commerce) utilizes it. By approaching your infrastructure from all sides, you give yourself a greater chance for success in the eCommerce solutions marketplace.

Related Content

You Also May Like

eCommerce Development

How This Nursery Increased Revenue 140% With HubSpot Email Marketing

Background Groove Commerce initially partnered with Caragh Nursery to migrate them...
Learn More
eCommerce Development

Rules & Requirements For Selling Food & Drinks Online

In recent years, consumer comfort in ordering perishable goods has exponentially...
Learn More
eCommerce Development

How Video Marketing Will Increase Your Business’s Conversions

Why Video Marketing? Video is something we consume everyday, multiple times a day....
Learn More
eCommerce Development

An eCommerce Merchant's Guide To Selling Consumer Packaged Goods

Introduction Because you’re reading this eBook, you’re likely an eCommerce retailer...
Learn More
eCommerce Development

The Best eCommerce Frameworks For Online Selling

What is an eCommerce Framework? The definition of the term eCommerce Framework is...
Learn More
eCommerce Development

Leveraging eCommerce for B2B Wholesale Operations

If you found this article on the web, you are likely a B2B Wholesale business that...
Learn More
20 Best Shopify Apps LP Background Small
eBook
E-BOOK

20 Best Shopify Apps For Your eCommerce Store

Download e-Book

Let's Grow Your eCommerce Business, Together.