1
votes

I followed the tutorial outlined here: https://cloud.google.com/nodejs/getting-started/hello-world

with app.js:

'use strict';

var express = require('express');

var app = express();


// [START hello_world]
// Say hello!
app.get('/', function(req, res) {
  res.status(200).send('Hello, world!');
});
// [END hello_world]

if (module === require.main) {
  // [START server]
  // Start the server
  var server = app.listen(process.env.PORT || 8080, function () {
    var host = server.address().address;
    var port = server.address().port;

    console.log('App listening at http://%s:%s', host, port);
  });
  // [END server]
}

module.exports = app;

Upon deploying to app engine, though the script is very simple, referencing the VM instances, it justifies bringing up 8 different instances:

enter image description here

Is this a normal behavior?

1

1 Answers

3
votes

Every time you do a gcloud preview app deploy, we create a new version of that application. Each version comes (by default) with 2 VMs. Looking at your list of VMs - I think I'm seeing ~5 different versions deployed.

To stop the old versions, go to the developers console, and use the UI to stop each old (non-default) version:

versions ui

That should get you back to where you expect. We are changing our tools (in the next few weeks) so that these stop automatically for you.

Hope this helps!