LAMP Stack vs LEMP Stack: What’s The Difference?

By Rob


Many people in the IT World are familiar with the acronym LAMP. It’s become synonymous with the PHP frameworks Laravel and Symfony, which have both gained increasing popularity in the last few years as powerhouses for websites across the world. But did you know there’s an alternative to LAMP known as LEMP? So, LEMP or LAMP, which should you choose? Let’s take a look.

What is a LAMP stack?

LAMP stands for Linux, Apache, MySQL and PHP. ‘LAMP stack’ simply refers to this set of technologies that are used to build and develop websites and web-based applications.

What is a LEMP stack?

LEMP stands for Linux, Nginx, MySQL and PHP. ‘Ngnix’ is pronounced ‘Engine-X’, which is where the ‘e’ in LEMP comes from.

What’s the difference between LAMP stack and LEMP stack?

There are several key differences between LAMP stack and LEMP stack:

 

LAMP StackLEMP Stack
Uses Apache web serverUses Nginx web server
Process-driven approachEvent-driven approach
Slows under heavy loadHandles higher load of requests
Creates new thread for each requestHandles multiple requests within a single thread
Apache does accept additional configurationNginx doesn’t accept additional configuration
Better use case for dynamic sitesBetter use case for static websites
Not as scalableUser-friendly scalability
More features and functionalityFaster and lightweight

Table adapted from: https://www.geeksforgeeks.org/difference-between-lamp-stack-and-lemp-stack/

Nginx vs Apache

Nginx is an alternative HTTP/HTTPS web server that tends to be lighter weight and historically more performant than Apache. More recently, the performance of the two servers has narrowed, but that doesn’t eradicate any potential benefits and drawbacks to each of the software. Depending on the PHP web application or framework in use, you may find better throughput from one or the other.

There are very few people who wouldn’t agree that Nginx is far more efficient at serving static content than Apache. However, the waters get muddied when serving dynamic content comes into play. This could be PHP, Python or any of the other multitude scripting languages that are used on the back-end to generate web content, but for the purposes of this article, we’re concentrating on PHP.

If your server is handling a single dynamic site, then it’s likely that Nginx will offer better throughput and scale better than Apache. Alternatively, if you’re hosting multiple dynamic sites, then the performance difference between the web servers is almost immaterial, as PHP itself will likely become the bottleneck to site delivery.

To put it simply, Apache has countless options, but you only need a handful of them. Nginx can cover those essentials, and it does the majority of them much faster than Apache.

LAMP stack vs LEMP stack: what’s the right choice?

For new sites or servers, both Apache and Nginx are powerful web servers. Therefore, choosing whether to use LEMP or LAMP is dependent on many factors, but we recommend the following:

  • For a fast and lightweight server for a single site, choose LEMP/NGINX
  • To host multiple sites or if you require specific additional functionality on the web server software, choose LAMP/Apache

For existing servers, the likelihood is that optimising PHP and adding the likes of APC or similar opcode cache is likely to speed things up far more than switching web server software and with far less upheaval.

If you’re unsure whether LEMP or LAMP is the right choice for you, call us now for a free consultation.

<< Back to Knowledge Centre

Related Technologies:


Join Our Newsletter

Contact Email  *
First Name 
Last Name 
*Required Fields
I agree to the  Privacy Policy and  Terms of Use 

Here's what other people think

Google Rating
5.0
High standard, professional service. I've worked with Welldata for a number of years and always found their DBA's to be knowledgeable and proactive. Throw any question at them and it will be resolved, it gives real peace of mind knowing you have a partner you can rely on from emergencies to general questions. They also like a challenge and we do throw a few curved balls at them.read more
Paul Miller
Paul Miller
12:34 27 Aug 21
The support I receive from Well Data is extremely responsive. Richard Parsons is my contact and keeps me informed daily on the health of our SQL Databases. Whenever I ask for assistance from Well Data it is quick and professional.read more
Kay Riley
Kay Riley
13:41 19 Aug 21
Really know their stuff and their response times are very good. They provide us with a vital service.
Andy Cole
Andy Cole
13:36 19 Aug 21
The guys at WellData really know their stuff. We wanted a quick route to doing something complex and they sorted it for us very quickly and to a high standard. Very professional, no ego, just excellent and to the point consultancy.read more
Steve Goacher
Steve Goacher
11:31 14 Nov 19
I have worked with the WellData team for many years now and they have always delivered.I would highly recommend them to any business looking for best-value outsourced Expert DBA’s.Being able to offer a rolling contract on the basis that if they don’t deliver you can leave shows their confidence and commitment.Their professionalism and knowledge is second to none.read more
Petro Bartoszyk
Petro Bartoszyk
08:51 18 Oct 19
A very dedicated team of extremely professional and knowledgeable experts
Giulia Iannucci
Giulia Iannucci
14:08 16 Nov 18
We use Welldata for SQL support and are very happy with their service.
David Sadler
David Sadler
09:40 15 Nov 18
Really know their stuff and their response times are very good.
Andy Cole
Andy Cole
11:45 06 Nov 18
Our partnership with WellData has enabled us to resolve critical database problems. Their attitude and service makes them a natural extension to our own technology team, which extends our capability in a critical area of our business.read more
Steve Fenton
Steve Fenton
10:56 05 Nov 18
Having worked with the team at Welldata for approaching 17 years, my company and I have always found them professional, reliable and generally a great firm to work with.read more
John Lynes
John Lynes
14:00 04 Oct 17
WellData provide an excellent level of support and their team are very knowledgeable and always go the extra mile. I would wholeheartedly recommend them.read more
Stefan Parrott
Stefan Parrott
13:12 19 Sep 17