This is the source code for Scalyr's Cloud Cost Calculator tool. You can read all about it in this blog post.
Contributions are welcome! We're open to any sort of suggestions. Any graphic designers out there who feel like cleaning up the page design are welcome to give it a whack.
We're especially interested in getting data for additional service providers, including some non-cloud hosting services. To contribute, just create a JavaScript file listing each offering from that provider. Your file should contain a series of function calls like this:
serverChoices.push({
"provider": "Google",
"region": "Europe",
"location": "Europe West",
"serverType": "n1-highcpu-4-d",
"reservationType": "hourly",
"term": "Hour",
"termMonths": 0.0,
"upfrontCost": 0.0,
"hourlyCost": 0.369,
"cores": 4.0,
"ramMB": 3686.4,
"diskMB": 1812480.0,
"flashMB": 0.0,
"networkMbps": 0.0
});
Look at files like linode.js for an example. Each call defines a single combination of server type, data center location, lease type, or any other parameters as appropriate to this service provider. The fields are interpreted as follows:
Field | Meaning |
---|---|
provider | Name of the company offering this server. |
region | What part of the world the server is in. Use "N. America", "S. America", "Europe", "Asia", "Africa", or "Australia". |
location | The service provider's name for this location. |
serverType | The service provider's name for this server configuration. |
reservationType | The service provider's name for this lease term or reservation type. |
term | Which category the lease / reservation falls into: Hour, Month, Year, or "3 Years". |
termMonths | How many months the lease / reservation lasts for; 0 for on-demand / by-the-hour services. |
upfrontCost | Any fixed, up-front cost for this offering, in dollars. |
hourlyCost | Any per-hour cost for this offering, in dollars. |
cores | Number of CPU cores (or equivalent). |
ramMB | Memory size, in MiB. |
diskMB | Disk size, in MiB. (SSD should not be included in this value; report 0 for SSD-only servers.) |
flashMB | SSD storage size, in MiB. |
networkMbps | Bundled/free network bandwidth, in Mbps (megabits per second). Note, this value is not currently used, but may be used in a future version of the tool. |
You can send us a pull request, or just e-mail us the JavaScript file and we'll add it in.
For questions, suggestions, feedback, or anything else: contact@scalyr.com.