Despite the emergence of cheap VPS, traditional web hosting is not going to die. Let's try to figure out what are the differences between the two approaches to hosting sites 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 communal apartments. It is difficult to argue with such an interpretation, although we will try not to be so unambiguous. Let's look a little deeper than superficial analogies and analyze for novice users the features of each 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 assumes the possibility of transmission as part of a request (uniform resource locator) - this allows the service to understand which site the browser or other client program is accessing. It remains only to bind the domain name to the desired IP address and specify the root directory for the virtual host in the configuration. After that, you can decompose the site files of different users into their home directories and open FTP access for administration.
In order for server-side web applications (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 sites. The database server (usually MySQL) for virtual hosts is also shared, but the hosting user has access only to his personal databases. All server software except site scripts is serviced by the provider, clients cannot change its configuration at their own discretion. The account management process is automated: for these purposes, each hoster 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 communal 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 run in an isolated environment (or container) and are unaware of other users' resources and processes. A separate guest OS is not launched in this case, meaning the software in the guest environment must be binary compatible with the system on the physical host—typically, clients are offered GNU/Linux distributions specially modified for this type of operation.LinuxThere are also more advanced options, including emulating a physical machine, on which you can run almost any guest OS, even from its own installation image.
From an administrator's point of view, any VPS is not much different from a physical server. When ordering a service, the hoster deploys the selected configuration, 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 that determine the choice of solution.
Which option is easier and more convenient?
Shared hosting does not require the administration of the environment that ensures the operation of the site. 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 a 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 eliminates these drawbacks of traditional hosting. The client can choose the OS they need (optional). Linux) and install any software. You'll have to configure and administer the environment yourself, but the process can be simplified—all hosting providers offer a control panel installed on the virtual server, which automates the administration process. Thanks to this, there's no significant difference in management complexity between traditional hosting and VPS. Furthermore, you can install your own panel, one not included in the provider's offerings. Overall, the overhead costs of VPS administration are minimal, and the solution's increased flexibility more than offsets the additional effort.
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 only at first glance. Attackers do not always exploit vulnerabilities in system software; websites are usually hacked using unpatched holes in scripts and insecure settings of content management systems. In this sense, traditional 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 hacked and starts, for example, sending spam or other malicious activities through it, the shared address may be blacklisted. In this case, all clients 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 service, an anti-virus service, etc. In terms of security and reliability, VPS is superior to traditional hosting, you only need to update installed programs 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 communal 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: we can own virtual server on Linux For 130 rubles per month. On average, a budget VPS costs 150-250 rubles per month. At these prices, the hassles of traditional hosting are unsustainable, unless you need to host simple business card websites. Furthermore, shared hosting plans limit the number of websites and databases, while with a VPS, the client is limited only by the server's storage capacity and computing capabilities.
Source: habr.com
