2

I started using Google Cloud for a webapp project of my own. I've been using many of its features such as Standard App Engine for deployment, and its SQL for databases.

In the last week I started using Cloud Storage for uploading and retrieving files. The thing is, that after creating a service account for this (as stated in the documentation), 8 VM instances are automatically created, not by me, and even if I delete or stop them, after a while new ones are started. These are created by the service account required for Cloud Storage for my project. I don't understand what is going on and its making me spend money I shouldn't be paying.

Any help for a solution to this problem would be great. Thanks

Diegonfx
  • 21
  • 2
  • Hi @Diegonfx - I have seen this type of behaviour before (in Google Compute Engine) when instances are part of a 'managed group'. Apologies if this is telling you things you already know! If you create an instance group you tell it the nominal number of instances that should exist and every time you stop/delete them they will be automatically reinstated (if autoscaling is off). If you edit the "managed group" template you can scale it down to a number that will hopefully save some money! – Paul Jun 05 '18 at 03:42

1 Answers1

0

GAE scenario: If you have a standard Google App Engine app, it is auto-scaled in response to processing volume, unless you choose the number of instances manually. All the configuration is specified by you in the app.yaml file. I recommend having a look at a table in this Instance scaling docs description. There are three types of scaling: automatic, basic and manual. What will be of your interest:

  • Manual scaling:

A service with manual scaling use resident instances that continuously run the specified number of instances irrespective of the load level.

  • Basic scaling:

A service with basic scaling is configured by setting the maximum number of instances in the max_instances parameter of the basic_scaling setting. The number of live instances scales with the processing volume.

Notice also that for manual and basic scaling you have a free daily quota of 8 instance-hours and for automatic scaling 28 instance-hours.

Managed instance group scenario: If you're using Compute Engine Managed instance group (not a GAE app), you can set the maximum number of replicas for the autoscaler with the --max-num-replicas option of the gcloud compute instance-groups managed set-autoscaling command.

arudzinska
  • 3,152
  • 1
  • 16
  • 29