B4J Tutorial [GCE] For Noobs, Part 13 - Pricing Calculator Basics - What To Consider

Hello Fellow Noobers!

This is a quick high-level tutorial to go over the pricing of VMs and some things for consideration.

GCE has A LOT of services to offer and each service has a fee (this is expected). I will cover the pricing structure for the VM created so far in this tutorial series. But first, here is the link to the online pricing calculator (https://cloud.google.com/products/calculator/).

Using the online calculator is not difficult but, to me, it’s a bit like shopping at IKEA. ie. if you buy a bed at IKEA then don’t forget to buy the slats for the mattress to rest on! With GCE’s pricing calculator, you need to include the VM, the disk and network traffic.

To add a VM and/or Disk to your monthly estimate follow these steps:
  • Are you using the right calculator?
    Look at the top and make sure that the ‘COMPUTE ENGINE’ icon is selected (as shown in the below image)
    hsq4F_lv8XKZkMNjmN6lMY5M66FZISXNbnVP7_t4GqBQiFsTF17PISflGcQXsWEsEWjJq2Y6vqtp0PrexmB9AIYAHnXctf1UAnJ1T0ikztN6RCUnqLp6mo4gYgfPi3lG4chgTkr8


  • Next, fill in the form and include the Number Of Instances, the Instance Type and the Datacenter Location (as shown in the image below)
    4WwFkLCxm3v34CrmKIk-z56ih9pCjvoPrrNYKfspDp29z-tfkmrYdQaH__CMNk7efciLVMsgj-1lVCA9VRotYdDSl1BFdUD9FHACwFPpIWxFeXVqWGqOOvs6DbBY_PRIWAlM5dz-


  • When that is filled in you can click the big blue button that is just underneath the form labelled ‘ADD TO ESTIMATE’

  • You should now see to the right of your browser screen the monthly Estimate for your VM (as shown in the image below). However, we’re not quite finished. Notice that the estimated price here is less than the estimated price when creating the same VM in your GCP console. The reason for this is that we still need to add the boot disk (remember, it’s like shopping at IKEA!)
    dzJO2zrajylmYZjy13leJSKrokDaFNZ7GIkxi_pGMGfHRPv35hcXTIaoXUyaNzOitf4wUV-dBXxQ6sEZe4xWSdbcswxHmRCoIfVOYXRszUuR3G4ypBya4tp1ftqJgfhAb7yxiFls


  • OK, in the same calculator (COMPUTE ENGINE) scroll down a bit until you see the next section labelled ‘Persistent Disk’.

    The default disk size for a newly created VM is 10GB. This is also the default size used for the VM that was created earlier in the tutorial series. Keep it the same and put ‘10’ into the field labelled ‘Persistent disk storage’ and then click the big blue button under this form.

    Why ‘Persistent disk storage’ and not ‘SSD Persistent disk storage’? Good question!
    The answer is that when a VM is created the boot disk is, by default, a ‘Persistent’ disk. This means that the disk is using standard hard drives just like the ones that you may already be using in your computer.

    If you want to use the SSD disk instead then that’s ok. The price will increase but it is not too much more for a 10GB disk.

    eIs8CUijjGEj74OMpqPj7RANZocdGs28dS_n_IyQ-Z49nLSQCa5646anj2WBDjLXyRrWu9V3JG3P5O6jmU0V2V8SkTfbREbVkVKpMZqJrR_5eMuctA8iqAeSlVlHkYsK8yCWVy7d


  • Now the estimated price, on the right of your browser, should be the same as the estimate price when you create the same VM in your GCP console.
    hxTvUg9zQZdDMgzJHadKPhp1t8nkeiSEeAFLOQBTK9BUQxIyxObsLKuK5RKbjo63E18fZP7bFommfWSPMDxcWmKz5Hj0mzPGpcFdDnRtVYJ0l7XHZmvZNsN9OSmsZHVLgOkGLTAc


  • There’s just one part left to add and that is the estimated cost for network traffic. Unfortunately, this usually requires a working crystal ball.

    Network traffic pricing varies and is dependent on whether the traffic is coming into the server (Ingress) or going out of the server (Egress). It also depends on where the traffic is coming ‘from’ and going ‘to’ (regions and zones). I have a technical term that I use to describe the pricing structure - ‘A dog’s breakfast!’. It would be a lot simpler if it were just a fixed price but, it’s not and we have to work with what we have :(

    If you already know what your network traffic for a month is going to be and which zones/regions are using the network traffic then you are well positioned to fill in the pricing form.

  • To add network pricing estimates we need to be using the correct calculator. Make sure that the calculator selected is ‘NETWORKING’ (as shown in the image below)
    nfMqCOBc2HaShJEeJw0dHbJetFjAQD3o-YZ2YpP91v35WExj_VVyD08b30WZ4zRDsXzb3n4g7alDr6kUs1k9Z9bZ4uQSMLjcliltNPxmsE-Eoan_QlY6N4R4498X3-Azsc_P1wmp


  • Fill in the form with the estimates from your crystal ball for each region.
    As a ‘rule’ I use the below values as a guide. If I know in advance how much traffic I can expect for a region then I’ll adjust it accordingly. ie. if I know that most of my traffic will be in the US and I also know that I can expect the traffic to be close to 10GB per month then I’ll adjust the values to match.
    In the screenshot below, I’ve circled the 3 values that I use as a guide.
    OZ5ruQmZv-WI6CCpbW0pvLIUSuv5cjCz3p6PJkd2sN0slRpIhh_yw5W1oN2t__8Le_RJmGe0o8IwRFLJtJsLylUXq-cBveNRYjbTvotsogRFWlURQOJ1OyKVGNQvFAaR2OX-B7uI


  • When you are done filling in the form click on the big blue button under the form labelled ‘ADD TO ESTIMATE’. The estimate on the right side of the screen should now include the network traffic.
    9cQWqNbzJGqgceC9TMVetHp8gC5SrE6JRijVJCl1eVazI9RUR_eUzACZ4zLu71iIKu8hSGgVNKU6fxf5mqfPFejuken18F4znOGTUs_xGv3-TUJMP1W0089VyWOB-4Y-PtbSmfHE


  • As can be seen the monthly estimate has increased by a massive amount! ;) Just kidding. US$0.25 a month is not going to break too many budgets.
    The 3GB network traffic estimate I use covers my expected network usage for a web site that I host on another platform. ie. For the web site I host, I do not use GCE because I did not know about GCE at the time I created the web site. The same 3GB is a very generous amount for my own personal web site.

  • Lastly, here is the link to the pricing structure for network traffic
    https://cloud.google.com/compute/pricing#network
There are a few other factors to take into consideration when determining the amount of network traffic. For example, images and static files are generally cached on the client’s browser/system and subsequent visits to your web site/app will not require as much network bandwidth. Also, some static files used in web sites are hosted by a CDN (Content Delivery Network) and therefore do not come from your VM (eg. jquery).

One other thing worth noting is that network traffic coming in to your VM (Ingress) is not charged. It’s only the outbound (Egress) traffic that is billed.

Finally, no network usage is billed while you are using the FREE trial. So if you have a web site or app running, while using the FREE trial, be sure to check the network usage of the VM using the console to monitor the monthly usage.
 
Top