Dedicated vs. Cloud vs. VPS vs. PaaS – a value comparison

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
  • $200-$1,250/mo
    4 Standard 2x Dynos ($200/mo)
    2x Performance M Dynos ($500/mo)
    1x Performance L Dyno ($500/mo)
Application Tier
  • $6,500-$17,750/mo
    22x Performance M ($5,550/mo)
    4x Performance L ($2,000/mo)
Persistence Tier
  • $50-$200/mo
    Heroku Postgres Standard 0 Plan ($50/mo)
    Heroku Postgres Standard 2 Plan ($200/mo)
    Heroku Postgres Premium 0 Plan ($200/mo)
Persistence Tier
  • $2,000-$3,500/mo
    Heroku Postgres Standard 6 Plan ($2000/mo)
    Heroku Postgres Standard 7 Plan ($3500/mo)
    Heroku Postgres Premium 6 Plan ($3500/mo)
Caching Tier
  • $30-$60/mo
    Heroku Redis Premium 1 Plan ($30/mo)
    Heroku Redis Premium 2 Plan ($60/mo)
Caching Tier
  • $200-$750/mo
    Heroku Redis Premium 5 Plan ($200/mo)
    Heroku Redis Premium 7 Plan ($750/mo)
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
  • $20-80/mo
    1x 4GB Linode ($20/mo)
    2x 4GB Linode ($40/mo)
    1x 8GB Linode ($40/mo)
    2x 8GB Linode ($80/mo)
Application Tier
  • $240/mo
    4x 16GB Linode ($240/mo)
    2x 32GB Linode ($240/mo)
Persistence Tier
  • $40-$80/mo
    1x 8GB Linode ($40/mo)
    1x 12GB Linode ($80/mo)
Persistence Tier
  • $160-480/mo
    1x Linode 24GB ($160/mo)
    1x Linode 64GB ($480/mo)
Caching Tier
  • $20/mo
    1x 4GB Linode ($20/mo)
Caching Tier
  • $60-$120/mo
    1x 16GB High-memory Linode ($60/mo)
    2x 8GB Linode ($80/mo)
    2x 16GB High-memory Linode ($120/mo)
Total Cost
$80 – $180/mo.
Total Cost
$460 – $840/mo.

 

DigitalOcean

Mid-scale configuration High-scale configuration
Application Tier
  • $20-80/mo
    1x 4GB Droplet ($20/mo)
    2x 4GB Droplet ($40/mo)
    1x 8GB Droplet ($40/mo)
    2x 8GB Droplet ($80/mo)
Application Tier
  • $320/mo
    4x 16GB Droplet ($320/mo)
    2x 32GB Droplet ($320/mo)
Persistence Tier
  • $40-$80/mo
    1x 8GB Droplet ($40/mo)
    1x 16GB Droplet ($80/mo)
Persistence Tier
  • $180-$260/mo
    1x 16GB Droplet + 1TB Block Storage ($180/mo)
    1x 32GB High-CPU Droplet + 1TB Block Storage ($260/mo)
Caching Tier
  • $20/mo
    1x 4GB Droplet ($20/mo)
Caching Tier
  • $40-$80/mo
    1x 8 GB Droplet ($40/mo)
    2x 8 GB Droplet ($80/mo)
    1x 16GB Memory-optimized Droplet ($80/mo)
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
  • ~$88-~$156/mo
    1x t2.large instance (8GB memory)($67.93/mo)
    2x t2.medium instances (4GB memory) ($67.94/mo)
    2x t2.large instance (8GB memory)($135.86/mo)
    50GB General Purpose SSD EBS volume + snapshot storage (~$20/mo)
Application Tier
  • ~$563/mo
    4x t2.xlarge (16GB) instances ($543.44/mo)
    2x t2.2xlarge (32GB) instances ($543.44/mo)
    50GB General Purpose SSD EBS volume + snapshot storage (~$20/mo)
Persistence Tier
  • ~$148/mo
    db.m4.large (8GB) RDS PostgreSQL instance with 50GB storage + 100 GB backup storage ($148.48/mo)
Persistence Tier
  • ~$837/mo
    1x db.m4.2xlarge (32GB) RDS PostgreSQL instance with 1TB storage (+ 2TB backup storage) ($837.06/mo)
Caching Tier
  • ~$66-~$133/mo
    1x cache.m3.medium (2.78GB) Elasticache (Redis) node ($65.88/mo)
    1x cache.m3.large (6.05GB) Elasticache (Redis) node ($133.23/mo)
Caching Tier
  • ~$266.45-~$532.90/mo
    1x cache.m3.xlarge (13.3GB) Elasticache (Redis) node High-memory Linode ($266.45/mo)
    2x cache.m3.xlarge (13.3GB) Elasticache (Redis) node High-memory Linode ($532.90/mo)
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
  • $89.99/mo
    1x HOST-32L, Xeon D-1520 (4 core/8 thread), 32GB RAM with
    2x480GB SSD ($89.99/mo)
Application Tier
  • $179.98-$383.98/mo
    2x HOST-32L, Xeon D-1520 (4 core/8 thread), 32GB RAM with 2x480GB SSD ($179.98/mo)
    2x EG-64, Xeon D-1520 (4 core/8 thread), 64GB ECC RAM with 2x480GB NVMe SSD ($383.98/mo)
Persistence Tier
  • $0/mo
    Utilize same host
Persistence Tier
  • $89.99-$191.99/mo
    1x HOST-32L, Xeon D-1520 (4 core/8 thread), 32GB RAM with 2x480GB SSD ($89.99/mo)
    1x EG-64, Xeon D-1520 (4 core/8 thread), 64GB ECC RAM with 2x480GB NVMe SSD ($191.99/mo)
Caching Tier
  • $0/mo
    Utilize same host
Caching Tier
  • $89.99-$191.99/mo
    1x HOST-32L, Xeon D-1520 (4 core/8 thread), 32GB RAM with 2x480GB SSD ($89.99/mo)
    1x EG-64, Xeon D-1520 (4 core/8 thread), 64GB ECC RAM with 2x480GB NVMe SSD ($191.99/mo)
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
  • $399/mo
    1x XEON E5-2620 v4 server, 32 GB RAM with 2x480GB SSD ($399/mo)
Application Tier
  • $798/mo
    2x XEON E5-2620 v4 server, 32 GB RAM with 2x480GB SSD ($798/mo)
Persistence Tier
  • $0/mo
    Utilize same host
Persistence Tier
  • $399/mo
    1x XEON E5-2620 v4 server, 32 GB RAM with 2x480GB SSD ($399/mo)
Caching Tier
  • $0/mo
    Utilize same host
Caching Tier
  • $399/mo
    1x XEON E5-2620 v4 server, 32 GB RAM with 2x480GB SSD ($399/mo)
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
* indicates reserved pricing
806 x 6844

Nicholas

Hi! I'm Nicholas. I am a software developer and the founder of Superset Inc. I keep a personal homepage at nicholas.zaillian.com and I can be reached by email at [email protected] (public key here if you want to encrypt your message).

No Comments

Leave a Comment

Please be polite. We appreciate that.
Your email address will not be published and required fields are marked