Dedicated vs. Cloud vs. VPS vs. PaaS – a value comparison
I find myself increasingly evangelizing for awareness of infrastructure and ops practices because I believe that such awareness (or lack thereof) has cascading effects for application architecture and, ultimately, company success. Understanding the relative value of platforms can keep you on a path of rapid execution. Misunderstanding or neglecting it can get you into very dire situations.
I see many teams break out their applications into services prematurely, with immense consequence in terms of cognitive overhead and loss of velocity. Typically the decision is a consequence of a perception that they have hit a performance ceiling, when in fact they are still on some relatively weakly-provisioned PaaS.
I want to do a detailed value comparison to aid others in making informed infrastructure decisions.
For the purposes of this comparison, we will consider two scenarios: what I would call a mid/moderate-scale app, with 60GB of data in persistence storage and a requirement to handle 200 requests/second, and what I will call a higher-scale app, with 1 TB of storage in use and a requirement to handle 3,000 requests/second.
We will also assume a relatively monolithic 12-factor application architecture, with an application tier, an application caching tier and a persistence tier.
There is necessarily a lot of variability in the performance profile and resource usage of applications. For the purpose of this comparison, we will assume a Ruby on Rails application running atop the Passenger web application server. We will assume each application process consumes 300MB, and we will use at most 88% of the available memory on each application server (which means we would fit 3 worker processes on an application server with 1024MB of RAM). The mid-scale application will therefore require 10 application processes (20x reqs/second/process x 10 processes = 200 requests/second), and the high-scale application will require 150 application processes.
We will assume the application is tuned well enough to average 50ms server times. This would mean that we can assume each server process we have active can roughly accommodate 20 reqs/second.
This makes the cost estimates in this comparison optimistic, as it does not account for sub-optimal request routing/load-balancing (particularly relevant to Heroku) nor the fact that very few applications will have a performance profile that reliably keeps requests at a 50ms/second average server time.
Category 1: PaaS
Note: based on our resource utilization profile outlined above, we assume that a Standard 2x Dyno can accommodate 3 worker processes, a Performance M Dyno can accommodate 7 processes (in 88% = 2.2GB of its total 2.5GB of memory) and a Performance L Dyno can accommodate 41 processes.
Mid-scale configuration | High-scale configuration |
---|---|
Application Tier
|
Application Tier
|
Persistence Tier
|
Persistence Tier
|
Caching Tier
|
Caching Tier
|
Total Cost
$280 – $1,510/mo.
|
Total Cost
$8,700 – $22,000/mo.
|
Category 2: VPS
For our VPS survey we will have a look at two of the leading VPS providers: Linode and DigitalOcean. Linode’s pricing is quite a lot better than DigitalOcean’s, but they have a public history of DDoS episodes that have taken major sites offline and an arguably less rich API and admin experience. I still consider Linode highly viable and think it is worth taking a close look if at both providers’ offerings if you are considering moving your infrastructure to VPS.
Linode
Mid-scale configuration | High-scale configuration |
---|---|
Application Tier
|
Application Tier
|
Persistence Tier
|
Persistence Tier
|
Caching Tier
|
Caching Tier
|
Total Cost
$80 – $180/mo.
|
Total Cost
$460 – $840/mo.
|
DigitalOcean
Mid-scale configuration | High-scale configuration |
---|---|
Application Tier
|
Application Tier
|
Persistence Tier
|
Persistence Tier
|
Caching Tier
|
Caching Tier
|
Total Cost
$80 – $180/mo.
|
Total Cost
$540 – $660/mo.
|
Category 3: Cloud
For Cloud, we will consider configurations on Amazon Web Services. We will keep things roughly aligned with our VPS specs. It is important to note that opting for Reserved pricing can realistically lower your AWS costs as much as 40-45%, but you must have a rough idea of what your resource utilization will be at least one year forward, so we will consider both reserved and On-Demand pricing here. We have used 40% as a rough benchmark since the precise calculations will be unique to your specific service selection and whether you are prepaying or not.
Mid-scale configuration | High-scale configuration |
---|---|
Application Tier
|
Application Tier
|
Persistence Tier
|
Persistence Tier
|
Caching Tier
|
Caching Tier
|
Total Cost
~$322 – $375/mo.
With reserved pricing
~$193 – ~$225
|
Total Cost
~$1,686 – $1,953/mo.
With reserved pricing
~$1,012 – $1,172/mo.
|
* note: we have not been very specific in calculations concerning block storage (EBS) costs at the application tier. The requirements at this tier (if you are using block storage at all) are likely to be insubstantial (~50GB). Opting for provisioned IOPS may raise your costs into the low $100s. If relying on General Purpose SSD + ephemeral storage at the instance level you will likely pay on the order of $20 or less as assumed here.
Category 4: Dedicated
It is not wholly straightforward to price a dedicated configuration as dedicated servers can be so generously provisioned that at moderate scale (such as our “mid-scale” application) it often makes sense to run all services on a single host. “High-availability” multi-host configurations are also possible and appropriate at larger scales or in contexts that require high availability. We will assume a high-availability, multi-host configuration for our “high-scale” application and a single-host configuration for the “mid-scale” application. We will consider both the budget host OVH (good value but spotty reputation for support and even uptime) and the slightly costlier Liquid Web (US-based managed host).
OVH
OVH offers good value dedicated hosting in several datacenters around the world. Their BHS/Quebec location is most relevant for American companies. There are some big caveat to OVH’s dedicated offering and it may not suit all applications. They have a history of leaving customers relatively on their own to sort out everything short of hardware failure. I also once firsthand experienced an episode of hours-long downtime due to a road accident that severed the datacenter’s fiber line (it is worrying that there was neither better fortification nor sufficient redundancy to keep hosts online). This one episode is the only major one I experienced however and it is well known that AWS services also go down, sometimes for similar periods of time, and sometimes even across all availability zones (such as memorably occurred with S3 in 2016).
Mid-scale configuration | High-scale configuration |
---|---|
Application Tier
|
Application Tier
|
Persistence Tier
|
Persistence Tier
|
Caching Tier
|
Caching Tier
|
Total Cost
$89.99/mo.
|
Total Cost
$359.96-$767.96/mo.
|
Liquid Web
Liquid Web offers managed hosting of dedicated servers. I include them in this comparison to contrast OVH since OVH is hands-off in a degree that may not align with the requirements of some businesses or teams. You pay a premium for a hands-on managed hosting solution but value is still good despite this.
Mid-scale configuration | High-scale configuration |
---|---|
Application Tier
|
Application Tier
|
Persistence Tier
|
Persistence Tier
|
Caching Tier
|
Caching Tier
|
Total Cost
$399/mo.
|
Total Cost
$1596/mo.
|
The Wildcard: Colocation
At a certain scale you may find your best fit to be none of the discussed solutions but rather colocation. With colocation you rent space in a data center (typically by the quarter, half or full-cabinet) and pay for power and bandwidth, supplying your own hardware. This means paying hardware costs upfront and then paying comparatively quite a lot less in your ongoing hosting costs. There are also potential accounting advantages to be realized with colocation (as you own the hardware, you can write down its depreciation). You will need to have either a team or team members who are experienced in managing physical servers, and colocation is likely not a good fit for all but very high-scale projects. If you want to read a good overview of a colocation deployment in practice, I recommend having a look at Nick Carver’s article about Stack Overflow’s infrastructure.
Conclusion
I hope this article provided a rough overview of the comparative costs of various paths you might follow with your infrastructure. Be aware that it is neither exhaustive nor conclusive. There is a lot of variability when it comes to architectures and needs, and the numbers used should be considered only a rough approximation of value. It should also be understood that in order to utilize non-PaaS infrastructure solutions well, ergonomic tooling and processes (for things such as bootstrapping new environments, database backup and restore, deployment, etc.) will be required. We have posted elsewhere on this subject (see: “How to mess up DevOps: working at the wrong level of abstraction“) so please refer to those articles or elsewhere on the web for info about infrastructure management and DevOps tooling.
We provide a matrix below to summarize the data from this article:
Heroku | AWS | LiquidWeb | DigitalOcean | Linode | OVH | |
---|---|---|---|---|---|---|
Mid-Scale Application |
$530 – $1,510 | ~$322 – ~$375 ~$193 – ~$225 * |
$399 | $80 – $180 | $80 – $180 | $89.99 |
High-Scale Application |
$8,700 – $22,000 | ~$1,686 – ~$1,953 ~$1,012 – ~$1,172 * |
$1596 | $540 – $660 | $460 – $840 | $359.96-$767.96 |
No Comments