Reputation: 21
My Google AppEngine appengine-web.xml file is as below. I'd like to use the max-instances setting such that my Free tier app will never leave the free tier. As I understand it, adding the following would work, followed by a re-deploy:
<basic-scaling>
<max-instances>1</max-instances>
</basic-scaling>
Is this true? I'm actually unclear where my app.yaml file is (i think a newer Eclipse plugin is needed to generate it).. but I am using an Eclipse Java project and my build creates the appengine-web.xml file, which is where i think these changes go, but i'm not sure.
thanks. ben.
=======Reference: my appengine-web.xml file==========================
<?xml version="1.0" encoding="UTF-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<threadsafe>true</threadsafe>
<sessions-enabled>false</sessions-enabled>
<runtime>java8</runtime>
</appengine-web-app>
Upvotes: 1
Views: 714
Reputation: 75735
If you want to stay in the free tier, prefer the automatic-scaling. Indeed, the free tier aren't the same as detailed here
In addition, take care of the size of your instance class and read carefully this page.
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.
Final details, in automatic scaling, when an instance is spawned, it's billed at least 15 minutes
For each instance, there is an initial start up cost of 15 minutes instance time.
And 1 hour for basic and manual scaling
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
Upvotes: 1
Reputation: 8066
Yes you understood correctly. You have to change xml file and redeploy.
According to the official documentation appengine-web.xml Reference:
Basic Scaling:
Optional.
The element sets the number of instances for a module.
This element can contain the following elements:
idle-timeout Optional. The instance will be shut down this amount of time after receiving its last request. The default is 5 minutes.
max-instances Required. The maximum number of instances for App Engine to create for this module version. This is useful to limit the costs of a module.
Here is an example:
appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<application>simple-app</application>
<module>default</module>
<version>uno</version>
<threadsafe>true</threadsafe>
<instance-class>B8</instance-class>
<basic-scaling>
<max-instances>11</max-instances>
<idle-timeout>10m</idle-timeout>
</basic-scaling>
Upvotes: 0