Despite the emergence of cheap VPS, traditional web hosting is not going away anytime soon. Let's try to understand the differences between these two approaches to website hosting and which one is better.

Every self-respecting provider's website will surely feature a comparison of traditional web hosting with virtual servers. Authors of articles note the similarities between VPS and physical machines, drawing parallels between them and private apartments, likening shared web servers to communal housing. It's hard to argue with such an interpretation, even though we will attempt to view it from a different angle. Let's delve deeper than surface-level analogies and explore the specifics of each option for beginner users.
How does traditional hosting work?
In order for a web server to serve different websites, so-called name based virtual hosts were created. The HTTP protocol allows for the transmission of a single resource identifier in the request, URL which enables the service to understand exactly which site the browser or another client program is referring to. All that remains is to link the domain name to the corresponding IP address and specify the root directory for the virtual host in the configuration. After that, files of different users' websites can be stored in their home directories, and FTP access can be provided for administration.
For server-side web applications (various scripts or even content management systems - CMS) to run with the rights of a specific hosting user, a special suexec mechanism was created in Apache. It's clear that the web server's security settings prevent users from interfering with each other's resources, but overall, it does resemble a communal apartment with separate rooms and a common address (IP) for hundreds of sites. The database server (usually MySQL) for virtual hosts is also shared, but the hosting user only has access to their personal databases. All server software apart from the website scripts is maintained by the provider; clients cannot change its configuration as they wish. The account management process is automated: each host has a dedicated web panel through which services can be managed.
How are VPS structured?
Comparing virtual servers to physical ones is not entirely accurate, as multiple VPS run on one physical host. Metaphorically speaking, it's more like an apartment building with a shared entrance and common load-bearing structures. To create separate "apartments" (VPS) within one "building" (physical server), resources from the host's operating system and various virtualization technologies are utilized.
When OS-level virtualization is used, client processes simply run in an isolated environment (or container) and do not see each other's resources or processes. In this case, a separate guest OS is not launched, so the software in the guest environment must be binary-compatible with the system on the physical host — typically, clients are offered specially modified GNU/Linux distributions tailored for this type of operation. There are also more advanced options, including emulating a physical machine where almost any guest OS can be run, even from its own installation image.
From an administrator's perspective, any VPS differs little from a physical server. When ordering the service, the host deploys the chosen configuration, and thereafter, system maintenance falls on the client. This allows for the installation of the required software and its configuration as desired — complete freedom to choose the web server, PHP version, database server, etc. The IP address of the VPS is also unique, so you won't have to share it with a hundred other neighbors. With this, we've covered the main differences, and we'll move on to the advantages and disadvantages that influence the choice of solution.
Which option is simpler and more convenient?
Virtual hosting does not require the administration of the environment that supports the website. The client will not have to install, configure, and update system and application software themselves, and in some cases, the hosting control panel allows for CMS installation — this option appears attractive for beginners. On the other hand, the tasks of fine-tuning the CMS will still need to be addressed independently, and behind the relatively low entry threshold lies reduced flexibility. The choice of software will be limited: for instance, on virtual hosting, you cannot change the version of PHP or MySQL at will, let alone install any exotic packages or choose an alternative control panel — you will have to use the tools provided by the service provider. If the provider conducts a server update, issues of software compatibility may arise in your web applications.
VPS is devoid of these drawbacks of traditional hosting. The client can choose the OS they need (not necessarily Linux) and install any software. Configuring and administering the environment will need to be done independently; however, the process can be simplified — all hosts offer the installation of a control panel on the virtual server, which automates the administration process. Thanks to it, there will be little difference in management complexity between traditional hosting and VPS. Furthermore, no one prohibits the installation of a custom panel that is not on the provider's list of offerings. Overall, the overhead costs of administering VPS are not that high, and greater flexibility compensates for some additional labor.
Which option is safer and more reliable?
It may seem that hosting websites on traditional hosting is safer. Resources of different users are reliably isolated from one another, and the provider keeps the server software up to date — this is a great option, but only at first glance. Attackers do not always exploit vulnerabilities in system software; they usually hack websites by using unsecured gaps in scripts and insecure settings of content management systems. In this sense, traditional hosting has no advantages — customer resources run on the same CMS — but it has plenty of disadvantages.
The main problem with virtual hosting lies in the shared IP address for hundreds of websites belonging to different users. If one of your neighbors gets hacked and starts sending spam or engaging in other malicious activities, the shared address may end up on various blacklists. In this case, all clients whose websites use that same IP will suffer. If a neighbor falls under a DDoS attack or creates excessive load on computing resources, the other 'tenants' of the server will be affected. Managing quota allocation for individual VPS is much easier for the provider; moreover, a virtual server is assigned a unique IP, and not just one: you can order as many as you want, along with additional services like DDoS protection, antivirus services, etc. In terms of security and reliability, VPS exceeds traditional hosting; you just need to update the installed programs on time.
Which option is cheaper?
A few years ago, the answer to this question was straightforward — despite all its drawbacks, a room in a communal apartment was much cheaper than a separate apartment. The industry does not stand still, and now the market has seen many budget VPS options: you can find them with us. renting a dedicated virtual server on Linux for 130 rubles per month. On average, a month of budget VPS operation will cost customers between 150 and 250 rubles. At these prices, tolerating issues with traditional hosting makes no sense, except when you need to host simple landing pages on the server. Moreover, virtual hosting plans limit the number of websites and databases, while on VPS, the customer is only restricted by storage capacity and server computing power.
Source: habr.com
