Difference between web servers: Apache, LiteSpeed and Nginx

yunarel

New member
Joined
Oct 13, 2014
Messages
62
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

New member
Joined
Nov 26, 2014
Messages
622
Points
0
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
10
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

New member
Joined
Nov 26, 2014
Messages
622
Points
0
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

New member
Joined
Nov 11, 2014
Messages
706
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.
 

MightWeb

New member
Joined
Mar 9, 2015
Messages
182
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.
 

iserveradmin11

New member
Joined
Mar 17, 2017
Messages
6
Points
0
Hello,
All the three are very good webservers but it al depends on one's need.
As apache is having lots of features but is slower then nginx.
Nginx faster so it depends that what are your requirements.
 
Older threads
Replies
2
Views
2,688
Replies
4
Views
2,979
Newer threads
Replies
24
Views
15,124
Replies
10
Views
4,869
Replies
8
Views
5,038
Replies
14
Views
7,541
Replies
5
Views
5,679
Recommended threads

Referral contests

Referral link for :

Sponsors

Popular tags

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