Shared hosting or virtual server - what to choose?

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.

Shared hosting or virtual server - what to choose?

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 URL (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 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 operation. There are more advanced options, up to the emulation of a physical machine, 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 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 is devoid of these disadvantages of traditional 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 hosters offer to immediately install a control panel on the virtual server that automates the administration process. Thanks to it, there will be no big difference in the complexity of management between traditional 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 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 to rent own virtual server on Linux for 130 rubles per month. On average, a month of operation of a budget VPS will cost a client 150-250 rubles, at such prices it makes no sense to put up with the problems of traditional hosting, except when you need to host simple business card sites on the server. In addition, shared hosting plans limit the number of sites and databases, and on a VPS, the client is limited only by the storage capacity and computing capabilities of the server.

Shared hosting or virtual server - what to choose?

Source: habr.com

Add a comment