Keywords

1 Introduction

In the contemporary world, Internet is an indispensable element for most companies in all significant market areas; a basis for the functioning of majority of the government agencies, NGOs and large portion of individuals. Statistics [10, 11, 19, 21] indicate that approx. 50% of world’s population has access to Internet, there is around about 1,8 billion active webpages, 6+ million computers online 24/7 and connected to the global network, and lastly 42 PT (!) bytes of data transferred every second. Internet has become a vital aspect for an increasing number (as for now 6,4% of total employed people) of professionally active people that work from home on a daily basis. Nowadays, it is not a difficult task to create even a complex website - there are many tools [12, 13] that isolate a user from the technical side - so that he could focus only on their needs, that is, filling the created site content. These solutions offer a range of capabilities desired by surfers, and everything is delivered in a very user friendly way. Every newly created web page or application needs a server to run on. Nowadays, there are two practical options: traditional hosting (on a dedicated server) or hosting in a cloud. Choosing the appropriate type of hosting for a web application may be difficult.

2 To Cloud or not

In times of shrinking budgets many companies [5, 14], from small and medium-sized businesses are looking for new ways to effectively ensure their web hosting needs. Hosting environment is rapidly changing, and many people are now looking beyond traditional hosting towards cloud one. Traditional approach comes mainly in two forms, dedicated and shared. With dedicated hosting, a company pays for the complete resources of one or more servers from a service provider. The client has full control over a fixed amount of resources (dedicated bandwidth, CPU, RAM, and drive space). With shared hosting, which is more common among small and medium sized businesses, the client pays for a set amount of space (storage) on a single server, and that server’s resources are shared by a number of other websites. Traditional hosting has drawbacks [2, 3]. Because the resources of a single server are shared among a number of different websites, spikes in traffic to those websites can mean decreased performance for your own. Security breaches and other performance issues on other sites make take yours down as well. And there’s a single point of failure. If the server itself experiences technical problems, everyone hosted on that server will be affected. Cloud hosting offers a level of scalability that traditional hosting can’t. Instead of paying for a set amount of space upfront on a single server, the user pays as they go for what they actually use. With cloud hosting, the load is balanced across a cluster of multiple servers. The information and applications contained on those servers are mirrored across the whole cluster, meaning that if an individual server goes down, there is no lost information or downtime. Because of this redundancy, cloud hosting is much more elastic and resilient. Problems with one website or application are unlikely to affect your bandwidth or performance. Cloud hosting companies provide Infrastructure-as-a-Service (IaaS) [18], which is a standardized, highly automated offering, where compute resources, complemented by storage and networking capabilities are owned and hosted by a service provider and offered to customers on-demand. Customers are able to self-provision this infrastructure, using a Web-based graphical user interface that serves as an IT operations management console for the overall environment. IT departments needn’t to invest in in-house server hardware. And customers don’t need to pay for up front for extra storage or processing capacity that they don’t use. Cloud hosting is more quickly scalable than traditional hosting [9]. If an application or website receives more or less traffic, the cloud servers scale up and down automatically. With cloud hosting, there’s no need to manually add or remove server space as there is in shared hosting. Cloud hosting is still a relatively new technology, and many who have experience with traditional hosting are reluctant to move to something different. Finding some suitable criteria for comparison IaaS and traditional hosting is a major issue. It was decided that besides technical parameters, a key constraint influencing the decision are ongoing monthly costs. Some studies have shown [15,16,17, 20] that a cheaper and more efficient may be the cloud. Cloud allows usually to handle a larger number of users at lower cost, which is a plus. However, one should pay attention to the characteristics of website traffic and the budget that was intended to allocate and obviously local market conditions. The research was conducted for three, diverse types of websites. The results will give a clear answer what kind of hosting is more suitable for which type of web applications on Polish market in late 2016.

3 Factors Influencing the Decision About Hosting

The final choice on hosting type is due to the different priorities and frequently a matter of a subjective decision. Given below factors helped us to structure research and make fundamental decisions.

3.1 Hidden Costs

Common sense dictates that the costs associated with a certain hosting solution is the most important aspect upon decision making. Everyone wants to spend as little as possible, and at the same time to achieve the best results. However, it is essential to address following question: How much capital do we need to run our website efficiently (performance wise) and cost-effectively? One should answer this question in the perspective of different time periods: one month, six months, year, or even two or three years. Aside from a hosting offer, other a (local) factor is heavily influencing the final cost – it is the exchange rate. While the dedicated servers have no problems with the settlement in any currency (almost every country has local products), whereas, in the case of cloud solutions most of them charge only in USD or EUR. Unfortunately, tested by us, Amazon cloud does not allow settling in Polish zlotys. These issues lead us the next uncertainty: the ability to predict costs. Hosting market is changing rapidly which leads to difficulties in predictability of costs in longer periods of time.

3.2 Expertise

Building a website and decision where to host it, are two essentially different services. Making a decision on the type of hosting still requires the physical implementation. At the same time, it is not a one-time task. What is needed is an experienced administrator with a certain knowledge: about the operating systems (usually Linux) and technologies used by the hosting site. In the cloud, one knows the architecture and the options available in the selected service provider. With it, one can efficiently and cheaper set up the server. With a traditional web hosting often happens that the administrator himself must take care of virtual machines on a separate Virtual Private Server and creation of backups, which are easily available in the cloud. In addition, in the cloud it is more difficult to configure a particular (optimal for our needs) instance. This is due to the fact that it can consist of many components: a separate service for file storage, database management or additional drives.

3.3 Prospect of Possible Changes

A lot may depend on the period that we have to analyze. If it is longer (over a year), an additional factor is the possibility of future site customizations. It may be due to technical issues and/or popularity of the page. Technical changes can lead to change in server requirements, since a website/application may require more resources over time. This in turn forces the analysis of how difficult it will be to change the current version of the hosting to another (usually more expensive and time consuming). Much easier is to predict whether in given time frame there will significant technical changes occur, rather than predict its near time statistics (number of visits, load). Application owners that count on their website high popularity must be prepared for consequences related to it. For this reason, it carried out various tests and generates appropriate load estimate. The more agents, the more difficult their effectiveness.

3.4 Risks

One of risk that should be mitigated is the potential unavailability of a site due to a failure of various nature (e.g. server failure, high load with limited resources, power outage etc.). It is common knowledge that uptime of the cloud servers is typically higher. In the case of physical damage of a dedicated server it may not be available for a longer while. The cloud hosting through replication avoids this problem. It is imperative to pay attention to the volatility of the cost. In the case of the dedicated hosting, cost for a defined period of time is fixed and known from the beginning. IaaS price is variable, calculated based on pay-per-use scheme. Some sudden spikes of load or unexpected influx of new users may result in unplanned, excessive costs. However, there are methods to avoid such a scenario (notifications and locks).

3.5 Anticipated Results

Review of available hosting offers (of dedicated servers and IaaS) does not imply an easy way how to compare them. Whereas once we can grasp the final price of traditional hosting solutions, TCO of IaaS offering without a detailed analysis, remains mystery. There are a few, rather superficial and generic research made [4, 6,7,8, 16, 17] that made attempt to address the question which hosting solution to choose. Unfortunately, none has addressed significant nuisances like different type of web application, different type of server load or local market conditions. Authors’ assumption was, both approaches have to be competitive. If it were not so, one of them would not exist or would significantly lost its presence on the market.

Since there is no “common knowledge” which is better in terms of monetary resources, it is assumed that the cost-effectiveness of hosting services on a dedicated server or cloud will “overleap” each other like on Fig. 1. Diagram in Fig. 1. depicts authors assumptions, how the final results may look like. As one can see, the graph for the classical hosting is non-linear (stepwise). One pays for the current hosting option until it turns out to be inadequate to the load and one switches to a more expensive one. Cloud chart is unpredictable, non-linear and with many variations. The costs vary in a short period of time. The greatest riddle was the difference between these charts in real world conditions. It was only assumed that for a certain load a better choice may be traditional web hosting, and for another cloud based one.

Fig. 1.
figure 1

Assumed cost of hosting (dedicated vs. cloud based) for a various number of users

4 Test Environment

As a basis for experiments we developed three types of websites (a brochure, standard and business one) that were later hosted on a dedicated server (provided by OVH – best value in the market) and in Amazon Cloud, which was chosen due its undisputed popularity.

A brochure was a very simple website (purely HTML based), which was mainly used to display information. It didn’t require a database. It consisted of up to a few pages (in our case it was a mere 2 MB total disk space). As for a standard site, we considered an application (with a database) that interacted with users. It was CMS based (WordPress) webpage of popular chain of restaurants (in our example: dB size 800 MB+, project files around 2 GB). As for business site, we considered a large set pages and an engine that required considerable amount of computations and intense database operations (it was a large Web-shop, based on Magento engine). The test environment was prepared to accommodate requirements of test websites, so both standard (based on WordPress) and business application (Magento) require PHP along with a database (MySQL). All websites were run on Ubuntu 14.04 with Apache 2.4 as a web server.

4.1 Dedicated Server – Traditional Hosting

Thanks to free software called Proxmox we were able to utilize resources of the dedicated server (Table 1.) as six Virtual Private Servers (Table 2). Monthly cost of the dedicated server was (304,93 PLN gross) which was rounded down to 300 PLN.

Table 1. Technical parameters of a dedicated server used for tests
Table 2. Technical parameters of 6 VPS - derived from the dedicated server.

4.2 Cloud Hosting - IaaS

As a cloud service provider, Amazon Web Services (AWS) was selected. This is one of the largest companies providing such services. An additional argument to use AWS was able to benefit from free testing. This offer is available for a year after opening an account. And some services (including ones we used), for some tenant instances are free for a period of 750 h of operation. It was very helpful during the initial server configuration. The basic service used during the tests was Elastic Compute Cloud (EC2). Thanks to it one can create instances of the web servers. AWS offers 40 different configurations, which differ in the number of vCPUs, memory, disk type, storage size and a price. The basic unit of account is the price per hour. Significant reductions in price can be achieved by purchasing services for a year or three years in advance (Table 3).

Table 3. Price (per hour of usage) of selected (EC2 instances EU- Frankfurt).

It was decided to test our test websites in five instances, which were available in competitive prices in relation to the dedicated server. EBS is an abbreviation of Elastic Block Store, and acts as a disk storage (SSD based) that stores files for EC2 instances (self-replicable, highly available and durable). In order to fully utilize the potential of the cloud for database operations RDS service was used. In the case of RDS prices vary due to the type of database (in our case MySQL) and a region (in our case EU – Frankfurt was selected) (Table 4).

Table 4. The parameters and the price of RDS instances (MySQL in EU- Frankfurt).

4.3 Tests and Measurements

The complete test scenario for a brochure, consisted in displaying the contents of all subpages. For a standard page, following order of actions was considered as a complete test scenario: opening main page, go to list of restaurants, choose one, choose menu, list of menu entries, pick an entry (open PDF), go to page with categories of recipes, choose a recipe, open contact page, fill and send a contact form. For a business page a test scenario consisted in: opening main page, go to one of static pages, choose a category of products, choose a product and its size, add a product to the shopping cart, go to shopping cart page, choose a buy as a guest option, fill in delivery address, go to the payment page, choose the form of payment, confirm the purchase and submit the form. All the measurements during test scenarios were taken/processed by following tools: Gatling, collectd, Graphite. During the tests following parameters were collected [1]: total # of simultaneous requests, total test time (times of user’s initialization and a test scenario preparation was included), time of users’ initialization (included in the test time, but defined separately), % of fulfilled requests (measured in a given timeframe, which could fall into one of following predefined ranges (in ms): >800, 800-1200, <1200 and failed (> 60000)). If % of unfulfilled requests was higher than 1% it was considered as failed, % CPU/RAM Usage, Server Load (for last minute), # of requests per second. In case of IaaS, CPU and RAM usage was additionally measured on a database instance.

5 Analysis of Results

One of the most important selection criteria is cost. And it was chosen as a parameter that can be used for comparison of the two hosting types. Cost of hosting on a dedicated server was trivial to define, since it was a simple monthly fee. Whereas the total cost of cloud based hosting (AWS), was far more intricate to project and influenced by the following factors: choice of EC2 and RDS instance type, storage type and its size, dB size, time of use. In our case, data was stored only in EC2 and not in S3 so not additional cost for data transfer was incurred. The initial examination of AWS offer, proved to be excessively expensive and simply unreasonable in comparison to offerings of traditional hosting from the local (Polish) market. In order to make it more money-wise, it was decided to use two different instances - one with better parameters (more capable) for 18 h. a day (where the load would be potentially higher) and other during remaining 6 h. (at night) the less capable one. Amazon is very flexible in terms of form of charging. Pay per use is the most expensive, whereas for payment in advance one may get accordingly 20–34% (depending on selection of a certain instance) discount for 1 year and 46–55% for 3 yrs. Taking advantage of promotional pricing, requires allocation of large portion of a budget before the application becomes profitable, which may not be suitable for everyone. At the same time, it collides with idea of flexible solution, which does not require large budget allocation for long period of time (Table 5).

Table 5. Max. number of fulfilled requests – IaaS vs. Traditional hosting

Performance tests revealed that for Standard and Business websites, a single VPS (the least capable) is able to meet almost twice higher load (in terms fulfilled requests than the most expensive (most capable) variant of cloud instances. Due its simplicity brochure website was independent of hardware - no matter of any variant of cloud or traditional hosting was used. The bottleneck constituted here rather a webserver than any other technical aspect. Brochure was the only case in the comparison where its hosting was more affordable in the cloud regardless of a hosting time-frame (monthly – 23 vs. 50 PLN and annually – 189 vs. 600 PLN) (Fig. 2).

Fig. 2.
figure 2

Business website - monthly cost of hosting for max # of user

For both the standard and business sites, cloud hosting turned out to be more expensive and less (capacity) efficient solution. Results for traditional hosting demonstrated that another (more expensive) VPS instance proved to be sufficient for a larger number of users. In the case of the Business website, the first instance (Ubuntu1) of the server allowed to handle 140 requests, another 280 (twice more), following next one 330 and the last one 370. For cloud hosting, the transition to more efficient configuration can mean considerable sudden increase in costs (e.g. from 200 to 340 PLN). One does not get significant increase of capacity but cost soars irresponsibly (Fig. 3).

Fig. 3.
figure 3

Standard website - monthly cost of hosting for max # of user

6 Conclusions

The work presented in the paper was devoted to the study cost effectiveness of traditional and cloud based hosting. We have examined three different websites in diversified environments. During performance and resource consumption tests we were able to demystify some myths that were considered as a common knowledge, but also managed to generally examine the applications running on systems with multicore processors. Analysis of the results allowed us to draw several noteworthy conclusions.

The research confirmed the fundamental belief stating that the choice of nowadays web hosting is not a trivial task. However, it denied our expectation that both hosting types would deliver comparable results, at least for the tested web applications. Some believes that cloud based hosting is far superior in many ways; we can confirm that in terms of resilience and availability it has no match; however, an intricate model of charging and high ongoing costs make it still economically unjustified. The nuisance in choice between two ostensibly alike hosting types, generally lies in finding a common ground of comparison. Even if just a cost and technical parameters are set as a common denominator, adequate comparison constitutes a bit of challenge. Monthly (and annual) total cost of hosting was primary (and decisive) factor in our final assessment of traditional and cloud based hosting. Traditional hosting proved to be a better choice for two of three types of the surveyed sites (Standard and Business). The cheapest proposed solution (a single, and yet not very powerful VPS) on a dedicated server was able to handle a larger number of active users than the most expensive instance of the cloud. The only exception was a brochure for which both traditional and cloud based hosting were able to handle the same maximum number of users at the same relatively inexpensive, but the most affordable hosting for it, turned to be cloud (it was just marginally less expensive). Situation would change diametrically if database would have been used, which in cloud based hosting involves additional costs. That was the main reason why for two other types of tested websites was cheaper to host them on a dedicated server regardless of a time-frame. In terms of technical parameters, it is worth to consider two things: even for websites with statistically little traffic the memory size should be greater than 2 GB (not enough memory is usually a bottleneck), whereas number of CPUs (and their speed) is vital for the websites with high traffic. The achieved results have raised new ideas for research. It would be useful to prepare more diversified sites. Architecturally and in terms even more mixed traffic. It would be useful to analyze the effect of streaming services and those who need large resources only in specific and custom time intervals. It would also good to break the limitation of a Web server. The point here is not being limited by a number of active requests, and to be able ALWAYS fulfil more requests with a stronger configuration. In the case of services based on PHP (like our Standard/Business sites), it would be beneficial for the sake of performance to test nginx server.