Difference between web servers: Apache, LiteSpeed and Nginx

yunarel

Member
Registered
Joined
Oct 13, 2014
Messages
33
Points
0
When you are going to launch a new website, you will muce face with choosing a hosting company. The basic criteria in choosing a hosting are as the following:
- Company reputation
- Server setup
- Technical support
- Reviews
- Features

In this post, we will not mention to the reputation or technical support but we will talk exclusively setup servers, specifically about web server most commonly used by hosting companies.

Apache
Apache is the most popular web server and most inexpensive shared hosting offers are on Apache.

It's not the most popular because it's the best but it's the oldest, is free (open source) and is installed by default with cPanel.

Apache problem occurs in high traffic, not very scalable, increasingly consume more resources and reach to block the whole server.

That's why when your site is getting more traffic, you will receive message from the hosting provider tell you that you stop your current hosting and upgrade to a VPS.

The problem is the construction of Apache, of how manages connections (process-based). Apache creates a new process/thread for each connection. And each process consumes memory and CPU So if you are more the performance is affected.

One solution would be a reverse proxy in front of Apache (nginx or varnish) to serve static elements (images, css, js, html) and Apache to reach only requests in php. It thus consume fewer resources and server can support more traffic.

Very few hosting companies do this because:
- Increases the complexity of the setup
- If it goes well everyone has the smallest hosting package and not upgrade

LiteSpeed
LiteSpeed ​​webserver is probably best for your shared hosting. It is 50% faster than Apache PHP script processing and serves up to 600% faster static elements. Consume fewer resources than Apache, can support more traffic, DDOS protection is integrated and can do absolutely everything that makes Apache but better.

From my point of view, the best solution for your shared hosting is a stack with CloudLinux operating system instead of CentOS and LiteSpeed ​​webserver instead of Apache.

CloudLinux completely isolated so customers will not get any site to consume too many resources and block and LiteSpeed ​​server provides better performance and scalability.

LiteSpeed ​​unlike Apache, but not process-based event-driven ie connections serving fewer processes, saving resources. It's a more efficient way to manage connections and that means you can handle more traffic with fewer resources.

This setup has a single problem, not free as CentOS + Apache. CloudLinux cost money, and he LiteSpeed ​​cost money and give a high price for hosting packages.

But the advantages are clear: you have stability, performance and scalability.

Nginx
Nginx can be used as a standalone webserver, not just as a reverse proxy in front of Apache. I do not know how to do many things like Apache but those that you know them 50 times faster.

Nginx does not have an integrated PHP mode so you need to communicate with a separate server PHP-FPM namely PHP5.

PHP5-FPM support "adaptive process swamping" which means low traffic site will move super fast and in case of a massive traffic will slow without lock.

Nginx is very scalable (event-driven) can support thousands of concurrent connections (this is and the purpose for which it was invented) and resource consumption is very small (and very predictable).

Setup Nginx/PHP5-FPM can not be used on a shared hosting but it is by far the best solution for a VPS with little memory.

Setup Sites Nginx using sites with very high traffic: Facebook, Instagram, Netflix, WordPress , Intel, CNN and other big websites.

Nginx problem is that it's not compatible with .htaccess and that there is little control panels compatible with it.

From my point of view these are not big problems, you can write rewrite sites that do the same thing you do htaccess rules and the control panel may be waived as long as your goal is performance not play through cPanel.

These are the most popular Web server used by hosting companies so if you want to choose a hosting solutions for your site are:
Cheap shared hosting solution if you want is a company that has a standard setup with Apache CentOS +
If you want stability and performance without paying a lot of money on a VPS when the recommendation is using LiteSpeed ​​+ company CloudLinux
if you want a VPS with ultra-performance Nginx is the best option

Above just my points, all depend on you. what servers do you want to have for your web hosting?
 

ElixantTechnology

Well-known member
Registered
Joined
Nov 26, 2014
Messages
281
Points
43
The main concern with Apache is that most hosting providers that utilize it don't take the time to learn how to tune it in such a way that it will handle a large amount of traffic. When tuned correctly and behind a reverse proxy like Nginx, your Apache based server will be capable of handeling just as much, if not more traffic than software like LiteSpeed.

One thing that makes Apache such a popular operating system is the fact that it is open source. A vast majority of the websites that you view on the internet are served by Apache servers, and a large number of people participate in development of the Apache project. Apache is an extremely powerful piece of software, but I do agree with you, out of the box it can be very sluggish.

This all boils down to the knowledge/experience factor. If you don't know exactly what you are doing, you're probably going to run into issues. I've been utilizing Apache now for more than 11 years, right now all of our servers at Elixant Technology utilize a heavily modified and tuned version of Apache with a Nginx reverse proxy, and I am proud to say that our servers are capable of serving content faster than a lot of other providers.
 

sunnied

New member
Registered
Joined
Feb 5, 2015
Messages
6
Points
0
Very useful post for both web hosts and those who are looking for hosts, thank you! My sites run on LiteSpeed+CloudLinux but I've seen comments out there that LiteSpeed is not worth its price. But I'm no techy, so I guess this would be a good choice for me. Thanks again for the share!
 

ElixantTechnology

Well-known member
Registered
Joined
Nov 26, 2014
Messages
281
Points
43
ElixantTechnology
What a lot of people don't realize is that CloudLinux and BetterLinux were developed not specifically for performance, but for server density. The biggest selling point about utilizing technologies such as these two operating systems and LiteSpeed is the main fact that hosts can be more profitable in the means that they can fit more customers on to one piece of hardware.

I still vouch for Apache with Nginx Reverse Proxy, as we have seen excellent performance and reliability out of this.
 

Hassan

Well-known member
Registered
Joined
Nov 11, 2014
Messages
433
Points
0
I would like to share LiteSpeed and Nginx suffers from security holes these are also not flexible and stable as apache integration ie plugins problem with litespeed and required programming skills whereas you can have everything with apache within minutes. Also Litespeed have restrictive EULA you are bound what content you can share with server high cost is another factor by optimizing apache you can have better speed than LiteSpeed or Nginx so in my eyes apache is winner.
 

ron13315

Well-known member
Registered
Joined
Jul 23, 2014
Messages
177
Points
0
I go for Apache for flexibility. with the power of xCache and eAccelerator. Apache Server Forever
 

ElixantTechnology

Well-known member
Registered
Joined
Nov 26, 2014
Messages
281
Points
43
ElixantTechnology
You can only leverage one at a time (xCache/eAccelerator), and both are PHP plugins, not Apache plugins ;) Though, I do agree.
 

MightWeb

Well-known member
Registered
Joined
Mar 9, 2015
Messages
126
Points
0
Most people will say that Apache is slow compared to Nginx and LiteSpeed, which is a very modified truth. Apache is not a bad webserver by any means - and properly configured, it'll be very fast. Then again, the same goes for other servers, such as Lighttpd.
Some take shortcuts with extreme caching (with that being an extreme long TTL on cache), whilst some actually properly spend time into configuration. There's no doubt however that Nginx and LiteSpeed are both great webservers, and they usually outperform Apache.
 

HostXNow

Well-known member
Hosting Provider
Registered
Joined
Nov 26, 2014
Messages
374
Points
28
I must say the newer mod_lsapi (lsphp / LiteSpeed) from CloudLinux works well with Apache, especially the new EasyApache 4.
 
Last edited:

HyperVMart

Member
Hosting Provider
Registered
Joined
Mar 21, 2017
Messages
55
Points
8
Thank for enlightening many on the pros and cons for lightspeed !...
 

David Beroff

Well-known member
Registered
Joined
Jun 14, 2016
Messages
1,501
Points
63

Leapswitch

New member
Registered
Joined
May 25, 2023
Messages
9
Points
1
While they perform a similar function of delivering web content to users, there are differences in their architecture, performance, and features. Apache is a robust and widely supported web server, LiteSpeed offers high performance and compatibility with Apache, and Nginx provides excellent scalability and efficient handling of concurrent connections.
 

worldbus

Member
Registered
Joined
Dec 7, 2017
Messages
20
Points
1
Best answer
We use Apache for flexibility, Nginx for scalability and performance, and Litespeed for non-economic projects and for maximum optimal performance.
 

Ticaga

Member
Registered
Joined
Sep 22, 2023
Messages
15
Points
1
I'm a Apache fan, however I do like LiteSpeed, their technology does make your website faster and it's easier to maintain than Nginx.
 

AlbaHost

Well-known member
Moderator
Hosting Provider
Joined
Jan 18, 2017
Messages
809
Points
43
AlbaHost
Of course litespeed is easier to maintain, the license price speaks for itself. While nginx is free, and from my opinion outperform the best in terms of speed between apache and litespeed, if you have knowlegde to optimise it right.
 

Cheerag Nundlall

Well-known member
Registered
Joined
Oct 12, 2016
Messages
336
Points
18
Nice post @yunarel!

In my opinion, if you're comfortable with Apache and need flexibility, stick with it.
If performance under high traffic is crucial and you're comfortable configuring more, consider Nginx.
If you want better performance than Apache with an easy-to-use interface and are willing to pay for additional features, consider LiteSpeed.
 
Newer Threads
Replies
10
Views
3,606
Replies
14
Views
6,279
Replies
4
Views
3,657
Replies
21
Views
10,397

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top