In this post I’m taking a closer look at the minimum cost required to get an application up and running, without compromising on security, and retaining some level of durability.

This example application runs a Node.JS web server, fronted by a load balancer and backed by a MongoDB replica set.

I have purposely selected the lowest cost compute instances available from each provider, which means as little compute power, RAM and storage as possible. It’s not a performance/cost comparison, since some providers offer lower minimum specifications than others. It’s also not something I would recommend for running your production environment on, but it gives us an idea of where the starting point is in terms of financial commitment, for getting an application online.

Although many providers could offer us virtual machines at an hourly or monthly rate, only five are listed below, because they are the most prominent and have the richest feature sets of all providers.

  MongoDB Nginx Web Consul Vault $/hour $/month $/year
                 
Joyent                
Type g4 g4 g4 g4 g4      
Cost 0.003 0.003 0.003 0.003 0.003      
Instances 3 1 1 1 1      
Cost/h 0.009 0.003 0.003 0.003 0.003 0.021 15.12 183.96
                 
AWS                
Type t2.nano n/a t2.nano          
Cost 0.0065 0.025 0.0065          
Instances 3 1 1          
Cost/h 0.0195 0.025 0.0065     0.051 36.72 446.76
                 
Google                
Type f1.micro n/a f1.micro          
Cost 0.006 0.025 0.006          
Instances 3 1 1          
Cost/h 0.018 0.025 0.006     0.049 35.28 429.24
                 
Azure                
Type A0   A0          
Cost 0.018 0.03 0.018          
Instances 3 1 1          
Cost/h 0.054 0.03 0.018     0.102 73.44 893.52
                 
DigitalOcean                
Type 512MB RAM 512MB RAM 512MB RAM          
Cost 0.007 0.007 0.007          
Instances 3 1 1          
Cost/h 0.021 0.007 0.007     0.035 25.2 306.6

Notes:

  • The full name of the Joyent instance type is g4-highcpu-128MB.
  • Google expects you to buy and upload your own SSL certificate, whereas AWS issues and manages one for you for free. The Vault instance on Joyent is intended to manage renewal of SSL certs from Letsencrypt (together with Consul).
  • This comparison does not take into account the cost of storage and log management, or any other costs outside the hourly instance rate.
  • All providers except AWS offer per-minute pricing.
  • Cost estimate for Azure Load Balancer is based on their Application Gateway.
  • Azure offers a range of managed application deployments, that are likely lower cost than rolling your own.