Reputation: 487
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.
Upvotes: 1
Views: 1015
Reputation: 39814
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:
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
Upvotes: 1
Reputation: 1044
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)
Upvotes: 1