Atlantic.Net Blog

Thoughts from the Creator of LEMP Stack

The LAMP stack is still the king as far as open-source development bundles go, but LEMP has quickly gained ground over the last few years. Let’s learn more about this increasingly popular web development stack.

  • What is a LEMP Stack?
  • A Look at its Components
  • More on Nginx and its Users
  • Thoughts from Igor Sysoev
  • Nginx vs. Apache in the Real World
  • One-Click LEMP Stack Hosting

What is a LEMP Stack?

In 1998, tech reporter Michael Kunze wrote an article for the German magazine Computertechnik, demonstrating how a developer can work with free open-source software instead of using proprietary systems. In that piece, Kunze became a rock star in the open-source community for being the first person to introduce the concept of LAMP.

LAMP Cloud Hosting is a server environment which a programmer can use to develop and deploy applications. LAMP is made up of Linux, Apache, MySQL, and PHP – although alternatives are often traded in for those various elements. In the case of a LEMP stack, the compact and speed-focused Nginx (pronounced “Engine-X”) takes the place of Apache.

A Look at its Components

Here are the four pieces of LEMP:

  • Linux: This operating system is open source and based loosely on Unix. Distributions of the OS often have package management features that make it easy to install the other apps, but you should ideally compile from source so you get the latest version.
  • Nginx: This web server “is an open source reverse proxy server for HTTP, HTTPS, SMTP, POP3, and IMAP protocols,” notes LEMP Stack Info. “It also functions as a load balancer, HTTP cache, and web server (origin server).” It is fast and doesn’t use a lot of RAM.
  • MySQL: This relational database management system is the second most popular in the world, although it’s worth considering MariaDB – a project spearheaded by the MySQL creators that is intended to replace it.
  • PHP: This scripting language is sometimes set aside in favor of open source competitors Perl or Python.

More on Nginx and its Users

Nginx is quick, lightweight, and designed to efficiently process a massive number of concurrent connections.

To improve scalability, Nginx doesn’t operate the way that web servers typically do. “[I]t doesn’t rely on threads to handle requests,” notes Pingdom. “Instead, it uses a highly scalable asynchronous architecture which makes it possible for it to handle thousands of requests at once without using up a lot of system resources.”

Nginx is free and open-source, which of course makes it more accessible for immediate use. It is often used in conjunction with Apache, with each web server handling different tasks.

It was developed by Igor Sysoev to improve the performance of Rambler, a Russian web portal. Coding of the software began in 2002, and the first version became available in 2004. A few major sites that are using the software are SourceForge, Hulu, and WordPress.com.

Thoughts from Igor Sysoev

Pingdom spoke with Sysoev, the developer of Nginx, back in 2010 – when the web server was starting to prove itself more dominant with 7% of the market (vs. the 17% it had achieved by October 2015).

Back in those first few years when Nginx was becoming a more recognizable name, its rate of adoption was accelerating at a mind-blowing pace, with 337% more websites in 2008 and 384% more in 2009.

When Sysoev was asked why he thought Nginx had become so popular, he had three basic ideas:

  1. It’s free.
  2. It came along at the right time to capitalize on developer frustration. “The nearest free competitor is lighttpd,” he said, “but it seems that lighttpd stagnated in 2007-2008 and many lighttpd users have switched to nginx.”
  3. Nginx was mentioned in a few coding books that had been published recently.

Sysoev also mentioned that he thought Nginx was used as a load balancer more often than it was as a primary webserver.

Nginx vs. Apache in the Real World

Just in terms of general performance, when people have benchmarked Nginx, its performance has typically been much more impressive than Apache. However, it’s often more useful to look at individual case studies. After all, Nginx is not the preferable choice to Apache for every possible scenario.

A case study by Linux Journal compared the performance of Nginx version 0.5.22  to that of Apache v2.2.8 using the Apache tool ab for testing along with vmstat and top for monitoring. “The results indicate that Nginx outperforms Apache when serving static content,” noted the publication. “Both servers performed best with a concurrency of 100.”

The specific results:

  • Apache served 6500 requests with 17 MB of RAM, 30% CPU, and four worker processes.
  • Nginx served 11,500 requests with 1 MB of RAM, 15% CPU, and one worker process.

One-Click LEMP Stack Hosting

Would you like to try out a LEMP stack for development, so you can experience the power of Nginx for yourself? With LEMP Stack Cloud Hosting from Atlantic.Net, you benefit from 100% solid-state drives, international data centers, and 24/7 support.

Cloud hosting services are only one of our offerings – we also offer dedicated hosting, managed hosting, and reliable HIPAA-compliant cloud hosting solutions.

Get a $250 Credit and Access to Our Free Tier!

Free Tier includes:
G3.2GB Cloud VPS a Free to Use for One Year
50 GB of Block Storage Free to Use for One Year
50 GB of Snapshots Free to Use for One Year