Classic hosting model vs Windows Azure

On Habré I recently, but already managed to notice a lot of interesting material and articles. Including from Andrei Cojocaru
korjik . Andrew many times laid out information on calculating the cost of hosting, conducted research on this topic for AWS and compared it with other solutions. I wondered what would happen if you look not only at AWS, but for example, at Windows Azure. I did a little research, made some conclusions and will be happy to discuss them in the comments. And the conclusion is simple: prices are about the same for everyone. The choice comes down mainly to the preferences of a particular customer, as well as to the ease of use of a particular solution for a particular technological stack.
Let's start.
Purpose of the study
The article compares the classic model of application hosting with hosting in Windows Azure. The advantages and disadvantages of each solution and the selected platforms are disclosed in accordance with functional and non-functional requirements. It compares the maximum number of options provided by both providers that fit the intended architecture.
Requirements
Let's define requirements on the example of quite real requests from one of the customers.
')
Functional
- Centralized services, including "real-time" logic and history storage
- Multifunctional communication with centralized services via UDP protocol and, possibly, via Data Sync (HTTP)
- Client application receiving real-time updates from the central service and able to send commands / requests back
- Reporting service that allows you to store history in a convenient way
- Information storage is divided into the following categories:
- - Configuration information (small volume, maybe even “read-only”)
- - Operational data (real-time session)
- - History of actions (history of events, parameters, “snapshots” up to 1 year inclusive)
- The ability to generate reports / BI Analytics from history is imperative
- Customizable reporting (something like SQL Server Reporting Services). Reports can be divided into three categories:
- - The current day is accurate to several minutes
- - The current month - up to several hours
- - Current year - up to several days
- OLAP cubes or “Data Mining” models should be easily constructed from history, if necessary.
Non-functional requirements
- Data storage: 1 year or approximately 200-300 gigabytes in the database
- - Operational data can reach 20 GB per cluster
- - History - up to 300 GB and more
- Performance
- - Delay less than 3 seconds for users and third-party systems
- - Report generation - no more than 30 seconds
- Reliability
- - Central Service: 1 week non-stop work under maximum load
- - Mandatory “backup” of data and the ability to restore them
- - No loss of critical information (events, settings, configuration files)
- - No database loss
- High Availability (HA)
- - The application is a “real-time” system, available 24/7, the maximum allowed “downtime”: no more than 15 minutes per week
- - Balancer and horizontal scaling of central services are mandatory
- Scalability
- - The possibility of horizontal and vertical scaling of “storage”, computing resources and the number of balanced machines to ensure the dynamic deployment of resources, if necessary.
- Expenses
- - Include iron / resource prices, licenses, software maintenance, traffic, etc.
- Security
- - Active Directory integration and standard user account management
- - Authentication and authorization
- - Encryption and logging - no
- Work with infrastructure
- - Easy installation, update, data archiving, monitoring, error logging, critical error notification
Considered platforms
- Classic Web Hosting
- Dedicated Web Hosting
- Windows Azure Virtual Machines
- Windows Azure Cloud Services
Decision analysis
First, it is interesting to look at the comparison of prices for different solutions, depending on the requested solutions:
- | Classic Web Hosting | Dedicated Web Hosting | Windows Azure Virtual Machines | Windows Azure Cloud Services |
---|
Database: | 200 MB for one database enabled | $ 259.99 / month Storage Size Limit | $ 225.80 / month for 1x150 GB DB + $ 14.25 / month / 150 GB (data) | $ 225.80 / month for 1x150 GB DB |
SQL Server license: | Enabled | Enabled | $ 898 | Enabled |
Reporting: | Enabled | Enabled | Enabled | Enabled; $ 0.88 / hour for SQL Azure |
Statistics: | - | Enabled | Enabled | Enabled; Azure not supported |
Backup: | Enabled | $ 49.99 / month | Enabled | Enabled |
Storage capacity: | Not limited | Not limited | $ 55.80 / month / 600 GB | $ 55.8 / month / 600 GB |
Traffic: | Not limited | Not limited | $ 122.28 / month / 1TB | $ 122.28 / month / 1TB |
Active Directory integration: | - | Is free | $ 19.90 for 1 million transactions | $ 19.90 for 1 million transactions |
Base price: | $ 12.74 / month | $ 169.99 / month | $ 115.20 / month | $ 172.80 / month |
Deployment Scenarios
Classic web hosting
SQL Server and the application are on the same machine, thereby ensuring that there are no delays between queries to the database. There are also no limits on the number of databases for the application. Web hosting provides unlimited bandwidth and data storage. The upgrade of the operating systems and the configuration process are automated. No need to purchase a SQL Server license.
However, there are many limitations and issues with using the classic web hosting model:
- The size of the database is limited to 200 MB. This can cause certain problems leading to a change in architecture.
- Notifications from the server to the client involve the use of a third-party application (for example, RabbitMQ). A scenario is also possible when the implementation of such notifications is not feasible in principle.
- Using SQL Server allows you to work with embedded "Reporting Services". As for the "Analytical Services", to enable this feature you will need to contact the technical support of the hosting provider.
- The resources of the CPU and RAM are common to all users of the provider. This may affect application performance.
- The required Active Directory functionality is built into the Windows Server 2008 image, but it is impossible to control the system remotely. To do this, you also need to contact the technical support provider
Total cost of the solution
Using only a standard hosting plan will cost $ 12.74 / month. Accordingly, after 6 months of use, the price will be
$ 76.44 . (prices and amounts are approximate, but quite true).
Conclusion
It is not recommended to use the classic web hosting model for such an application. Deploying the application in such conditions will often have to communicate with the technical support of the provider, and not always receive a response quickly. Due to the use of shared resources in the system, it is impossible to accurately predict the future performance of the application. Installing Active Directory, Analytical Services, Push alerts can cause problems, if at all possible.
Dedicated web hosting
Such a scenario is not as cheap as the one discussed above, but it has certain advantages over it. The application needs a push notification service, and this model allows you to install any application for this (ZeroMQ, RabbitMQ, others). SQL Server is also located along with the main application. Required queue and alert services are supported. The size of the database is limited only by the size of the disk space. Since There is no common resource pool (CPU, memory), you can predict the performance of servers and applications. Using Active Directory transactions, alerts and queues for free, because This enters the normal server-client traffic. Prepaid traffic volume - 1 TB.
However, the following problems occur:
- Windows Update service is not automated
- Making backups paid: $ 49.99 / month
- Additional DB capabilities also cost $ 259.99 / month
- SQL Server is located with the IIS application. This can cause problems when using complex queries and affect the response time of the application. To solve this, you may need an additional hosting provider.
- There is no simple way to increase the power for the application, and if it is, it is only for an additional fee.
Total cost of the solution
The total cost of such a solution, including a standard hosting plan, database and backup function, for 6 months of use will be:
$ 2,899.82Conclusion
It is possible to use this solution for hosting a specific application. Any necessary software can be independently installed additionally. SQL Server is included in the cost of hosting. However, it is difficult to automate the process of the application and the system as a whole. Using SQL Server on a separate machine will also entail additional material costs.
Windows Azure Virtual Machines
This solution is a good option because allows you to scale the application. This can be done both manually and automatically. Queues and alerts are enabled when using the Service Bus. You can use a separate machine for hosting SQL Server to improve its performance, or place the database on one of the applications used, thereby reducing the cost. Two models of disk space usage are also available: REST space and Virtual Machine disks. Backup is built. You can use the authentication mechanism provided by Windows Server Active Directory. A huge advantage: if the need arises, you can easily migrate to another cloud solution.
Problems:
- Standard SQL Server license is not included. Price - $ 898 one time, after 6 months trial period
- Installation of the operating system, SQL Server and system updates is not automated
- Almost every option is charged separately: traffic, disk space, etc.
Total cost of the solution
The cost of the solution “Virtual Machine + SQL Server”, including 600 GB of disk space, 1 TB of traffic, integration with Active Directory, backup, license for SQL Server for 6 months, will be
$ 2,862.58The same solution, but using SQL Azure will cost
$ 3233.88 . The option of using SQL Server turned out cheaper, because license fee ($ 898) is one-time.
Conclusion
It is recommended to use such a solution for this particular application. Simply scale the application and connect the necessary third-party applications yourself. The main problem with this solution is the price (compared to previous versions), including the license for SQL Server. Also, the process of updating and configuring virtual machines is not automated. A full SQL Server allows you to use Reporting Services and Analytical Services.
Windows Azure Cloud Services
This method is almost the same as the previous one. The main difference is in the maintenance process. No need to install system updates or SQL Server. Active Directory Federation Services can be used for authentication, but it is better to configure Active Directory separately on SQL Server, thereby obtaining the full functionality of one and the other. Deployment is fully automated directly from Visual Studio, eliminating the need to prepare images.
Disadvantages:
- All the same license for SQL Server, $ 898, if SQL Azure features are not enough
- Almost every option is charged separately: traffic, disk space, etc.
Total cost of the solution
The cost of the solution "Cloud Service + SQL Server", including 600 GB of disk space, 1 TB of traffic, integration with Active Directory, Backup, license for SQL Server for 6 months, will be
$ 3,579.48 .
Conclusion
It is possible and well to use this solution, even despite its high price. If necessary, you can use a separate machine with SQL Server. The administration process is entrusted to the provider. This method allows you to focus on developing the application, because Most configuration processes are automated, and the application is published directly from Visual Studio.
General conclusion
The best way to host and host an application is Windows Azure Virtual Machines + SQL Server. To implement the mechanism of push-notifications, you can use any tools from both third-party manufacturers (for example, RabbitMQ, ZeroMQ, others), and Microsoft (Service Bus). Purchase of a license for SQL Server is one-time, and the size of the database is limited only by the size of the storage account. Also, dedicated SQL Server will allow full use of Reporting Services and Analytical Services. However, the process of configuring and maintaining the infrastructure may incur additional staff costs.