简体   繁体   中英

Google Cloud node.js flexible environment

I deployed a node.js app as a learning tool and noticed that I'm getting billed for the project (around a $1/day). I know node.js on Google Cloud uses Compute Engine to run the vm's, but they say the flexible environment has all the advantages of the AppEngine platform, but it seems the instances don't auto stop and start to reduce billing when not in use.

I have java project that's been running on App Engine for years and I've never been billed anything, i'm guessing that's because the instances are shutdown automatically when not in use. So my questions are;

Is there a way to configure the flexible environment to mimic the standard environment to reduce the operating costs?

Am I miss-using something with the flexible environment?

According to Google App Engine Documentation ,

Instances within the standard environment have access to a daily limit of resource usage that is provided at no charge defined by a set of quotas...

Instances within the flexible environment are charged the cost of the underlying Google Compute Engine Virtual Machines.

According to this article ,

Currently, the Flexible Environment needs at least one instance running to serve traffic and there is no free tier.

This means that at any one time, you have at least one instance running, if you're using a Flexible VM. That should explain the billing.

Please note that by default appengine launches two g1-small instances. Depending on your application needs, this may be an over-kill. You should configure the compute resource settings in your app.yaml to the appropriate sizes of RAM, disk size and CPU, so as to save costs. You may also want to specify the min_num_instances as 1 in your service scaling settings .

I had the same problem. You can try to use Google's pricing calculator to figure out which configuration you need and how to minimize the cost of your application.

According to the calculator, the minimal cost for a flexible environment app is a little less than 40$ per month, There is nothing to do about it right now.

I eventually moved to Heruko because of that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM