2020 Update - No More Free Google Cloud
On January 2020, Google has made horrendous change to Google Cloud’s pricing.
From on, External IP Address will be charged for each instance.
Price is roughly 2 to 3 USD per month for each instance.
This means there is NO way to host your server absolutely free on Google Cloud.
Old Post from below
Google App Engine is a great choice when you want to host small website for free.
To make sure you don’t go beyond the free usage limits, or to save some costs, here are some strategies you can take.
default_expiration and expiration
- url: /css static_dir: public/css expiration: "7d" - url: /js static_dir: public/js expiration: "7d"
expiration element allows to control the length of caching.
If you are certain the served content does not change for x amount of time, you can set the value to x.
NOTE: Once you set this, the cache will spread across all Google Servers (eg Proxy), which means, you will not visualise the change to cached content until cache expiry have reached. It is best to set expiration to low value when debugging.
automatic_scaling: max_instances: 1 max_idle_instances: 1 min_pending_latency: "3000ms"
Free usage limit for instance is
28 frontend instance hours per day, 9 backend instance hours.
By default, App Engine scales your app to match the load. Your apps will scale up the number of instances that are running to provide consistent performance which could result in sooner use up of hours.
You can restrict to at most 1 instance with above values.
You can control the spending as describe in this page.
Set to zero and you are guaranteed of no charge!
For extra safenet, you can create budget alert where if amount reaches threshold, you will be notified.