Google Cloud Platform for Architects
上QQ阅读APP看书,第一时间看更新

Billing

Google offers a very easy-to-use tool to estimate the cost of running your instance with a particular configuration.

VMs range in price from pretty cheap to really expensive. In the following screenshot, you can see that a VM with 1 vCPU and 2 GB of memory is projected to cost $21.90 per month:

However, scaling this instance to 20 vCPU cores and 170 GB of memory will incur a hefty $830 per month, as seen in the following screenshot:

VMs are very transparent about their pricing, while when provisioning one, you are told what the base rate will be. This base rate varies with the specs and OS of the machine—as the preceding screenshots show, VMs could be either really cheap or really expensive, depending on how powerful you'd like them to be.

A natural question then is—how is this base rate going to be applied? All machines are charged for one minute at boot time, which is the minimum charge for a VM, after which, the per-second pricing begins. A bill is sent out at the end of each billing cycle, listing previous usage and charges.

The estimated costs of your instances and Compute Engine resources can be seen when you create them in the Google Cloud Platform Console or you can estimate your total project costs with the Google Cloud Pricing Calculator.

You should know that VMs are billed until they are deleted, and that charges accrue even when the VM is stopped. A stopped VM will not incur charges for CPU, but you will still be charged for attached disks and IPs.

There is some fine print around how exactly these sustained discounts are calculated. For predefined machine types, all VMs in the project within the same zone are grouped together into one inferred instance—this makes the discount much more generous of course. For custom machine types, the CPU and memory usage are separately pooled across all VMs in the same zone, and then a discount rate is applied separately to each.