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?
- 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?