Pricing for the Google App Engine Flexible env, $ 500 lesson

I followed the Nodejs tutorial for App Engine Flexible @: https://cloud.google.com/nodejs/getting-started/hello-world

Having successfully deployed and tested the tutorial, I slightly modified the code for the experiment and successfully deployed it ... and then left it working, since it was a testing environment (not public).

A month later, I received from Google an account worth more than $ 370!

In the details of the transaction, I see the following:

October 1–31, 2017 RAM for the Flex App Engine instance: 5948.774 Gibibyte-Hours ([MYPROJECT]) $ 42.24

October 1–31, 2017 Base hours for an App Engine Flex instance: 5,948.774 hours ([MYPROJECT]) $ 312.91

How did this testing environment with almost 0 requests take about 6,000 hours of resources? In the worst case scenario, I would suggest that 720 hours of full-time work during the month at $ 0.05 per hour would cost me ~ $ 40. https://cloud.google.com/appengine/pricing

Can anyone help shed some light on this? I could not figure out why there were so many resources?

Thanks for the help!

For more data, this is traffic for the last month (mainly 0): Traffic data

And instance data Instance data

UPDATE: note that I made one modification to package.json: I added nodemon as a dependency and added it as part of my "nmp start" script. Although I doubt this explains the 6,000 hours of resources:

  "scripts": {
    "deploy": "gcloud app deploy",
    "start": "nodemon app.js",
    "dev": "nodemon app js",
    "lint": "samples lint",
    "pretest": "npm run lint",
    "system-test": "samples test app",
    "test": "npm run system-test",
    "e2e-test": "samples test deploy"
  },

App.yaml (by default - no change from the tutorial)

runtime: nodejs
env: flex
+22
3

Google, - () , . , .

, , , GAE, .

, GAE " $ gcloud app deploy ", , , , , .

: https://cloud.google.com/appengine/docs/standard/python/an-overview-of-app-engine.

, , . , . , , app.yaml, 2 .

Google :

App Engine , , , , , , .

, , . , nodemon, , -, .

, , 4 , 2 , 1,5 , 0 , 500 .

GAE FLEX ENV:

  1. , , , : https://cloud.google.com/billing/docs/how-to/budgets

  2. , , , :
    $ gcloud app deploy --version v1

  3. app.yaml, 1 :

runtime: nodejs
env: flex

# This sample incurs costs to run on the App Engine flexible environment.
# The settings below are to reduce costs during testing and are not appropriate
# for production use. For more information, see:
# https://cloud.google.com/appengine/docs/flexible/nodejs/configuring-your-app-with-app-yaml
manual_scaling:
  instances: 1
resources:
  cpu: 1
  memory_gb: 0.5
  disk_size_gb: 10

enter image description here

. : https://medium.com/google-cloud/three-simple-steps-to-save-costs-when-prototyping-with-app-engine-f flex-environment-104fc6736495

, , , , .

Google App Engine Flex env , . Heroku, , /. , ! https://www.heroku.com/pricing

500 , , , Google App Engine Flex Env.

+49

, GAE FE, - ( ..), GAE, . 4+ 1M+ (Mailgun . : ", 24 , ", API ), Redis , , 503 "Down For Maintenance"), .

, GAE FE - (redis), . ! Compute ( , "" ), .

" " 2 , , GAE 100% , "". Google Cloud SQL.

, 7 , , , , , , , . GAE.

+2

Also note that if you still want your application to have automatic scaling, but you do not want the minimum 2 instances to work by default at all times, you can configure your app.yaml as follows:

runtime: nodejs
env: flex
automatic_scaling:
  min_num_instances: 1
0
source

Source: https://habr.com/ru/post/1688769/


All Articles