Steve, who asked to remain anonymous, works on his spare time, on a big project called Snoop. It aims to send alerts when a product matching different criteria, appears on websites such as Ebay or Craigslist.
To build this awesome project, Steve needs an awesome infrastructure! He immediately thinks to host it in the Cloud, to take advantage of the offers flexibility. And when we think about cloud, we think first about the leader on the market : AWS.
The project is a Ruby based application, collecting information in a MongoDB cluster and using a Load Balancer to dispatch users, depending on the traffic.
- To run a MongoDB cluster, Steve needs 3 machines that can handle a lot of IOPS
- Ruby is known to be hungry with memory, so the application will requires 3 instances with a lot of RAM.
- The Load balancer doesn’t need something specific, except a good network latency.
Opening the Great Grimoire of AWS Instances
What it’s feel when you have to choose an instance
What kind of Virtual Machine should I choose for my MongoDB cluster ? Is the R3 or M5 families the right one for my usage? What are their raw performances for compute intensive task? What is the cheapest family with a good IO write ratio ? Which ones come with optimized EBS? In which region? I want a VM with good network performances, what family should I take? Should I commit for 1 year? With a partial or without upfront?
Anyone that has to spawn a Virtual Machine in the cloud has asked at least one of those questions. But without any deep search or benchmark, these are really hard to answer.
The Magical Formula
After digging into AWS instances documentation, Steve chooses the following configuration for his architecture :
|MongoDb Cluster||3x i3.large (2 vcpus, 15Gb RAM)||$372/month|
|Load balancer||1x c5.large: (2 vcpus, 4Gb RAM)||$70/month|
|Application||3x r3.xlarge: (4 vcpus, 30Gb RAM)||$810/month|
It will be deployed in Ireland (where most of its audience is), and paid on demand (it’s mostly a MVP), all of this will cost to Steve 1,250$/month.
Here Comes the Wizard Cloudscreener
A few months later with its initial architecture, Steve though about how he can reduce the cost, and created an account at Cloudscreener.
The Cloud Decision Engine collects pricing information of major cloud providers, and allows to find the best suited infrastructure depending on your needs.
He selects it’s infrastructure, without engagement :
Here’s the result for AWS:
Steve can save 12% on its actual infrastructure (from 1,250$ to 1,096$ a month), without any loss of performance, only by switching from a r3.xlarge family to r4.xlarge.
What About Changing Cloud Vendor
Steve is not tied to AWS and wants to see if he can save more with another provider. He adds Azure and Google Compute Engine to its search :
And now he can find a cheaper infrastructure :
Here are the differences:
|Old VM||Old price||New VM||New Price|
|i3.large (2 vcpus, 15Gn)||$372/mo||n1-highmem-2 (2 vcpus, 13GB)||$197/mo|
|c5.large: (2 vcpus, 4Gb)||$70/mo||n1-standard-2 (2 vcpus, 7.5GB)||$51/mo|
|r3.xlarge: (4 vcpus, 30Gb)||$810/mo||n1-standard-8 (4 vcpus, 30GB)||$635/mo|
Steve can now save 30% with an infrastructure run on Google Cloud: 883$/mo instead of 1,250$/mo.
Diving in the plethora of cloud vendors catalog is extremely complex. In 2017, RightScale reports that companies overspend 45% in Cloud. Think about it, your company may be in Steve’s situation.
When companies start a new project or need to reduce cost of their cloud usage, it’s always hard to find the best suited machines, engagement or region in the growing catalog of cloud vendors (for instance, Cloudscreener compute ~300K differents prices in 70 regions).
Let’s give it a try !