Difference between web servers: Apache, LiteSpeed and Nginx

Joined
Oct 13, 2014
Messages
33
Best answers
0
Ratings
15
Points
0
#1
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
Joined
Nov 26, 2014
Messages
281
Best answers
0
Ratings
145
Points
43
#2
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
Joined
Feb 5, 2015
Messages
6
Best answers
0
Ratings
2
Points
0
#3
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
Joined
Nov 26, 2014
Messages
281
Best answers
0
Ratings
145
Points
43
#5
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
Joined
Nov 11, 2014
Messages
433
Best answers
0
Ratings
126
Points
0
#4
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
Joined
Jul 23, 2014
Messages
177
Best answers
0
Ratings
15
Points
0
#6
I go for Apache for flexibility. with the power of xCache and eAccelerator. Apache Server Forever
 

MightWeb

Well-known member
Joined
Mar 9, 2015
Messages
126
Best answers
0
Ratings
62
Points
0
#8
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
Joined
Nov 26, 2014
Messages
373
Best answers
0
Ratings
25 1
Points
28
#9
I must say the newer mod_lsapi (lsphp / LiteSpeed) from CloudLinux works well with Apache, especially the new EasyApache 4.
 
Last edited:
Joined
Mar 21, 2017
Messages
54
Best answers
0
Ratings
4
Points
0
#10
Thank for enlightening many on the pros and cons for lightspeed !...
 

David Beroff

Well-known member
Joined
Jun 14, 2016
Messages
973
Best answers
0
Ratings
83 1
Points
28
#12
Newer Threads
Replies
10
Views
1,811
Replies
14
Views
2,735
Replies
4
Views
1,794
Replies
21
Views
5,088
Latest Threads
Recommended Threads
Replies
3
Views
1,342
Replies
4
Views
851
Replies
1
Views
141

Latest postsNew threads

Latest Hosting OffersNew Reviews

Sponsors

Latest Blog ArticlesMost Viewed Threads

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