There should really be a option to limit to a specific number of instances, no matter what. In the application settings menu all you can do is to limit the maximum number of IDLE instances, which I'm not sure if it works as intended. I mean I set the Max Idle Instances to 1 and the Min Pending Latency to 15 seconds, but I still see 2 instances running occasionally, for long period of times with no requests. Aren't they supposed to close after 15 min of being idle? And why does it even fire a seconds instance with those settings, considering that no request reached 15 seconds delay?
I run a simple "what's my IP" python app, that really doesn't need high performance. I mean it really doesn't make a difference if the response is after 100ms or 5 seconds, all it matters is that only one instance is running, so that those daily 28 instance hours don't ever run out.
App Engine is a fully managed, serverless platform for developing and hosting web applications at scale. You can choose from several popular languages, libraries, and frameworks to develop your apps, and then let App Engine take care of provisioning servers and scaling your app instances based on demand.
App Engine supports the following scaling types, which controls how and when instances are created: Automatic (default) Basic. Manual.
Google App Engine (GAE) is a platform-as-a-service product that provides web app developers and enterprises with access to Google's scalable hosting and tier 1 internet service.
You can only have one App Engine App per project. However you can have multiple services and multiple version for each service. Yup. You can create multiple services under the same app.
My app is currently having only litte number of traffic, so paying even a little dollar is a matter to me. After learning and trying so many option on how to optimize the instance class. I found the following setting that gives me a lowest billing rates on running application with Billing Status Enabled on Google Appengine.
I use F1 Class to set Frontend instance.
Here i the code in yaml version.
instance_class: F1 automatic_scaling: max_idle_instances: 1 # default value min_pending_latency: automatic # default value max_pending_latency: 30ms
I use B1 class to set Backend instance.
Here i the code in yaml version.
instance_class: B1 basic_scaling: max_instances: 1 idle_timeout: 10m
And here is the code to put in appeengine.web.xml (if compiling java with maven)
<threadsafe>true</threadsafe> <instance-class>B1</instance-class> <basic-scaling> <max-instances>1</max-instances> <idle-timeout>10m</idle-timeout> </basic-scaling>
Usually I am running 4 modules, 2 modules in F1 class, and 2 modules in B1 class. They cost me 0 daily. However when my site is getting busy against traffic then I raise up the class to F2 and B2 and the total daily cost is less than US$ 0.50.
Here are some tips to reduce the billable instance:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With