1
votes

My App Engine Frontend Instances cost changed significantly last month. I am curious what has happened.

In March 2017, App Engine Frontend Instances: 522.945 Hours = $13,33

In February 2017, App Engine Frontend Instances: 678.713 Hours = $0,10

In January 2017, App Engine Frontend Instances: 763.959 Hours = $0,39


We have 28 free instance-hours per day if we set automatic scaling for the frontend according to https://cloud.google.com/appengine/quotas

So I shouldn't pay any money for "App Engine Frontend Instances" if I set the following in my appengine-web.xml. Am I right?

<automatic-scaling>
    <max-idle-instances>1</max-idle-instances>
</automatic-scaling> 

Thanks.

2
Normally reaching out to the billing team at support.google.com/cloud/answer/6293765 should give you the best clarification on pricing and charges for your Cloud projects;JL-HaiNan
If you want to limit your cost, you should use basic-scaling with max_instances setup cloud.google.com/appengine/docs/standard/python/config/… instead of automatic_scaling, as automatic scaling will kick up new instances based on request rate, response latencies, and other metrics of your application;JL-HaiNan
Automatic scaling has 28 free instance hours per day whereas basic scaling has only 9.lembas
This is not true actually, and I believe you're referring to cloud.google.com/appengine/quotas#Instances. However, it should be meaning that everyday you have 28 free Frontend instances hours and 9 free Backend instance hours, so scaling type will not affect your free Frontend instance hours -:pJL-HaiNan

2 Answers

1
votes

No, your understanding is incorrect.

The meaning of the max-idle-instances setting is different than what you appear to be expecting. From Scaling elements:

<max-idle-instances>

The maximum number of idle instances that App Engine should maintain for this version. The default value is "automatic." Keep the following in mind:

  • A high maximum reduces the number of idle instances more gradually when load levels return to normal after a spike. This helps your application maintain steady performance through fluctuations in request load, but also raises the number of idle instances (and consequent running costs) during such periods of heavy load.
  • A low maximum keeps running costs lower, but can degrade performance in the face of volatile load levels.

Note: When settling back to normal levels after a load spike, the number of idle instances can temporarily exceed your specified maximum. However, you will not be charged for more instances than the maximum number you've specified.

The 28h/day can easily be exceeded:

  • if you use more powerfull instances
  • if the traffic your app receives causes multiple instances to be launched

From Standard environment instances:

Applications running in the App Engine standard environment are deployed to instance classes that you specify. This table summarizes the hourly billing rates of the various instance classes.

...

Note: For each instance, there is an initial start up cost of 15 minutes instance time.

Instances running in manual and basic scaling services are billed at hourly rates based on uptime. Billing begins when an instance starts and ends fifteen minutes after a manual instance shuts down or fifteen minutes after a basic instance has finished processing its last request. Runtime overhead is counted against the instance memory limit. This will be higher for Java than for other languages.

Important: When you are billed for instance hours, you will not see any instance classes in your billing line items. Instead, you will see the appropriate multiple of instance hours. For example, if you use an F4 instance for one hour, you do not see "F4" listed, but you see billing for four instance hours at the F1 rate.

So check your app configuration, your app's traffic patterns and the app's instance usage in the developer console.

You should keep in mind that automatically scalable GAE apps always have cost components dependent on the external user request patterns which are not controllable. See (you need to apply it to java, tho) Python App Engine webapp2 slow to route

1
votes

You better reach out to the Cloud Billing team at https://support.google.com/cloud/contact/cloud_platform_billing to open a billing ticket with them, and they'll be able to give you more insights regarding the charges.

What I can think of for your charges now is that on one day or several days, your app used quite lots of instance hours after exceeding the free 28 hours per day, resulting charges on the chargeable instance hours (Note: the free instance hours are granted daily instead of monthly)