Shared Hosting vs Virtual Server - what to choose?

Started by lokdown, Aug 02, 2022, 12:03 PM

Previous topic - Next topic

lokdownTopic starter

Despite the emergence of cheap VPS, traditional shared hosting is not going to die. Let's try to figure out what are the differences between the two approaches to hosting websites and which one is better.




On the site of every self-respecting provider, there is sure to be a comparison of traditional web hosting with virtual servers. The authors of the articles note the similarity of VPS with physical machines and draw parallels between them and their own apartments, relegating shared web servers to the role of shared apartments.
It is difficult to argue with such an interpretation, although we will try not to be so unambiguous. Let's look a big deeper than superficial analogies and analyze for novice users the features of every option.

How does traditional hosting work?

So that the web server could serve various sites, the so-called. name based virtual host. The HTTP protocol implies the possibility of transmitting a URL (Uniform Resource Locator) as part of the request - this allows the system to understand which website the browser or other client program is accessing. It remains just to bind the domain name to the desired IP address and specify the root directory for the virtual host in the layout. After that, you can decompose the website files of different users into their home directories and open FTP access for administration.

In order for web applications on the server side (various scripts or even content management systems - CMS) to run with the rights of a particular hosting user, a special suexec mechanism was created in Apache. It is clear that the security settings of the web server do not allow users to climb into someone else's garden, but in general it really looks like a communal apartment with separate rooms and a common address (IP) for hundreds of websites.
The database server (usually MySQL) for virtual hosts is also shared, but the hosting user has access just to his personal databases. All server software except site scripts is serviced by the provider, clients cannot modify  its configuration at their own discretion. The account management process is automated: for these purposes, every hosting provider has a special web panel through which you can manage services.


How are VPS arranged?

Comparison of virtual servers with physical ones is not entirely correct, since many VPSs work on one "iron" host. Figuratively speaking, this is no longer a shared apartment, but an apartment building with a common entrance and single supporting structures. To create separate "apartments" (VPS) within the same "house" (physical server), the means of the operating system installed on the host and various virtualization technologies are used.

If OS-level virtualization is used, client processes simply work in an isolated environment (or some kind of container) and do not see other people's resources and processes. A separate guest OS does not start in this case, which means that the software in the guest environment must be binary compatible with the system on the physical host - as a rule, customers are offered GNU / Linux distributions specially modified for this method of running.
There are more advanced options, up to the emulation of a physical apparatus, on which you can run almost any guest OS, even from your own installation image.

From an administrator's point of view, any VPS is not much different from a physical server. When ordering a system, the hosting provider deploys the selected layout, and then the maintenance of the system falls on the shoulders of the client. At the same time, you can install the necessary software and configure it as you like - complete freedom to choose a web server, PHP version, database server, etc.
The VPS also has its own IP address, it will not have to be shared with a hundred or other neighbors. On this, with a description of the main differences, we will finish and move on to the advantages and disadvantages on which the choice of solution depends.

Which option is easier and more convenient?

Shared hosting does not require the administration of the environment that ensures the operation of the website. The client does not have to install, configure and update system and application software himself, and in some cases the hosting control panel allows you to install CMS - this option looks attractive for beginners.
On the other hand, the tasks of fine-tuning the CMS will still have to be solved independently, moreover, less flexibility of the solution is hidden behind a relatively low entry threshold. The choice of software will be limited: on shared hosting, you cannot, for example, change the version of PHP or MySQL at will, and even more so install some exotic package or choose an alternative control panel - you will have to use the tools offered by the service provider. If the provider performs a server upgrade, your web applications may experience software compatibility issues.

VPS is devoid of these disadvantages of usual hosting. The client can choose the OS he needs (optionally Linux) and install any software. You will have to configure and administer the environment yourself, but the process can be simplified - all hosting providers offer to immediately install a control panel on the virtual server that automates the administration process.
Thanks to it, there will be no huge difference in the complexity of management between shared hosting and VPS. In addition, no one forbids installing your own panel that is not included in the provider's list of offers. In general, the overhead of VPS administration is not so high, and the greater flexibility of the solution more than pays for some of the additional labor costs.


Which option is safer and more reliable?

It may seem that hosting sites on traditional hosting is safer. The resources of different users are securely isolated from each other, and the provider monitors the relevance of the server software - this is a great option, but just at first glance. Attackers do not always exploit vulnerabilities in system software; websites are usually hаcked using unpatched holes in scripts and insecure settings of content management systems.
In this sense, usual hosting has no advantages - customer resources work on the same CMS - but there are enough disadvantages.

The main problem with shared hosting is the shared IP address for hundreds of websites of different users. If one of your neighbors is hаcked and starts, for example, sending spam or other malicious activities through it, the shared address may be blacklisted. In this case, all users whose sites use the same IP will suffer. If a neighbor falls under a DDoS attack or creates an excessive load on computing resources, the rest of the "residents" of the server will suffer.
It is much easier for the provider to manage the allocation of quotas for individual VPS, in addition, a separate IP is assigned to the virtual server and not necessarily one: you can order any number of them, an additional DDoS protection system, an anti-virus service, etc. In terms of safety and reliability, VPS is superior to shared hosting, you just need to update installed software in a timely manner.

Which option is cheaper?

A few years ago, the answer to this question was unequivocal - for all its shortcomings, a room in a shared apartment was much cheaper than a separate apartment. The industry does not stand still and now a lot of budget VPS have appeared on the market: you can rent your own virtual server on Linux from us for $2 a month.
On average, a month of running of a budget VPS will cost a client $3, at such prices it makes no sense to put up with the problems of usual hosting, except when you need to host simple business card websites on the server. In addition, shared hosting plans limit the number of sites and databases, and on a VPS, the client is limited just by the storage capacity and computing capabilities of the server.
  •  

Charlesth

I don't understand the modern trend to take cheap virtual servers for websites on WordPress, OpenCart, etc. After all, placing the same sites on shared hosting is more reliable and profitable.

Shared hosting is not what it was 10 years ago. Today you can often find hosting based on CloudLinux. In simple words, this is an analogue of a virtual server based on OpenVZ, where each user is allocated a certain amount of resources (processor and memory). The cost of hosting includes a control panel. The hosting provider itself monitors the relevance of the software and the operation of all server services.

Simultaneously, if you buy a paid panel and full round-the-clock administration of a virtual server, it becomes more expensive than regular hosting. Often clients are told that administration is not needed, the server will be set up once and it will work. It will work until they find some vulnerability in exim, proftpd, vesta. A lot of servers were hаcked through them.

I think that  a virtual server should be taken when the resources of a regular hosting are not enough, or there is a need for some exotic software.
  •  

richtedy

Pros and cons of hosting sites on shared hosting:

Positive:
Everything is already set up, you just host the sites and they work
Convenient hosting panel. Nothing extra in the settings
Low price, compared to VDS
You can take hosting for free for a test period, install a CMS in a few minutes and the site will already work.

Minuses:
Dependence on neighbors, since resources are shared
Shared IP address (it is possible to purchase an individual one)
So, we can conclude that the advantages of hosting are its simplicity in settings. One of the weaknesses is dependence on neighbors and limited resources.
If you plan to host simple small websites, then hosting will be the best option. To see how easy and fast it is to create a site from scratch on hosting, check out this instruction (there is a video)

If you are planning to host highly loaded projects: large stores or sites where page loading speed is critical, then you should look towards buying a virtual server.

Pros and cons of hosting on a virtual VPS server:
Pros:
Your projects are on fully dedicated resources. This guarantees always high speed of the sites.
A dedicated IP address is provided with each server. It belongs only to you and it is guaranteed not to be in any lists.
You can configure the server yourself as you like. Open and close ports, set policies, and so on.

Minuses:
You need to configure the server. This issue is almost completely closed by renting the ISPmanager panel, which makes it possible to configure web server even for a beginner. In fact, after installing this panel, you get a configured web server as on a hosting.
The price is slightly higher than for the hosting service.
A little more knowledge is required (even with the ISPmanager control panel)

What conclusion can be drawn? Obviously, if your web sites are not critical to the dependence on the loading of the node by neighbors and the purity of common IP addresses (landing pages, simple not heavy sites), or you are just starting site building, then you should take hosting.
If you have serious commercial projects with a large attendance or you are critically interested in SEO optimization and high page loading speed is important to you, then you definitely need to order a virtual web  server.
  •