Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to estimate hosting services cost on GAE?

I'm building a system which I plan to deploy on Google App Engine. Current pricing is described here:

Google App Engine - Pricing and Features

I need an estimate of cost per client managed by the webapp. The cost won't be very accurate until I have completed the development. GAE uses such fine grained price calculation such as READs and WRITEs that it becomes a very daunting task to estimate operation cost per user.

I have an agile dev. process which leaves me even more clueless in determining my cost. I've been exploiting my users stories to create a cost baseline per user story. Then I roughly estimate how will the user execute each story workflow to finally compute a simplistic estimation.

As I see it, computing estimates for Datastore API is overly complex for a startup project. The other costs are a bit easier to grasp. Unfortunately, I need to give an approximate cost to my manager!

Has anyone undergone such a task? Any pointers would be great, regarding tools, examples, or any other related information.

Thank you.

like image 845
code-gijoe Avatar asked Jan 10 '12 20:01

code-gijoe


People also ask

How much does Google hosting cost?

Try it free for 14 days. Google Workspace plans start as low as $6 per user per month for Business Starter, $12 per user per month for Business Standard, and $18 per user per month for Business Plus.

How does Google App Engine Charge For instance usage?

App Engine flexible environment pricing These virtual machine resources are billed on a per-second basis with a 1 minute minimum usage cost. Billing for the memory resource includes the memory your app uses plus the memory that the runtime itself needs to run your app.

How does the pricing model work in GCP cloud?

The Google Cloud Platform offers pricing based on four principles: No upfront costs—users are never required to make an upfront investment to use any GCP services. Pay as you go—across compute, storage, and data transfer, Google only charges for resources actually used, allowing users to scale up and down flexibly.


2 Answers

Yes, it is possible to do cost estimate analysis for app engine applications. Based on my experience, the three major areas of cost that I encountered while doing my analysis are the instance hour cost, the datastore read/write cost, and the datastore stored data cost.

YMMV based on the type of app that you are developing, of course. If it is an intense OLTP application that handle simple-but-frequent CRUD to your data records, most of the cost would be on the datastore read/write operations, so I would suggest to start your estimate on this resource.

For datastore read/write, the cost for writing is generally much more expensive than the cost for reading the data. This is because write cost take into account not only the cost to write the entity, but also to write all the indexes associated with the entity. I would suggest you to read an article by Google about the life of a datastore write, especially the part about Apply Phase, to understand how to calculate the number of write per entity based on your data model.

To do an estimate of instance hours that you would need, the simplest approach (but not always feasible) would be to deploy a simple app to test how long would a particular request took. If this approach is undesirable, you might also base your estimate on the Google App Engine System Status page (e.g. what would be the latency for a datastore write for a particularly sized entity) to get a (very) rough picture on how long would it take to process your request.

The third major area of cost, in my opinion, is the datastore stored data cost. This would vary based on your data model, of course, but any estimate you made need to also take into account the storage that would be taken by the entity indexes. Taking a quick glance on the datastore statistic page, I think the indexes could increase the storage size between 40% to 400%, depending on how many index you have for the particular entity.

like image 62
Ibrahim Arief Avatar answered Sep 23 '22 00:09

Ibrahim Arief


Remember that most costs are an estimation of real costs. The definite source of truth is here: https://cloud.google.com/pricing/.

A good tool to estimate your cost for Appengine is this awesome Chrome Extension: "App Engine Offline Statistics Estimator".

You can also check out the AppStats package (to infer costs from within the app via API).

Recap:

  • Official Appengine Pricing
  • AppStats for Python
  • AppStats for Java
  • Online Estimator (OSE) Chrome Extension
like image 39
Riccardo Avatar answered Sep 26 '22 00:09

Riccardo