3

I was wondering what the difference between an instance and an instance group are.

Can anyone explain the difference to me?

Why can we use Autoscaler with an instance group and not with a instance

Grzenio
  • 35,875
  • 47
  • 158
  • 240

1 Answers1

4

In GCE, An instance is a single virtual machine that you can customise (CPU, network, endpoint, disk, etc) and manage by you (shutdown, run, build with new image, etc)

https://cloud.google.com/compute/docs/instances/

An instance is a virtual machine hosted on Google's infrastructure.

Instances can run the Linux images provided by Google, or any customized versions of these images. You can also build and run images of other operating systems.

While an instance group is a collection of the instances above, for management. i.e. I have two groups, slow instances and fast instances.

Autoscaler is something that you can use with Managed Instance Group. This a group that is created by Instance Manager using an instance template.

https://cloud.google.com/compute/docs/instance-groups/

A Compute Engine Autoscaler automatically adds or removes virtual machines from a managed instance group based on increases or decreases in load. This allows your applications to gracefully handle increases in traffic and reduces cost when the need for resources is lower. You just define the autoscaling policy and the autoscaler performs automatic scaling based on the measured load.

Hope it helps. Cheers.

Wan B.
  • 18,367
  • 4
  • 54
  • 71
  • I know that. I have read the google docs before asking. But that still wondering for me. Because, the Autoscaler will be run with single instance. I don't understand why we can't? This is the single method to do a personal instance running like app engine ? (scaling automatically) – David Cesar Santos Jun 15 '15 at 13:52
  • Sorry I don't quite understand your question. AutoScaler will run only a single instance if a single instance is enough to handle the workload. You can configure the workload threshold in Policy. Try lowering the threshold, and do a stress test, it should create more instances when it reached the threshold. AutoScaler has similar behaviour to AppEngine that it scales automatically, but also gives you the freedom of having your own virtual machine. – Wan B. Jun 15 '15 at 21:32
  • Ok, if I understand everything. the instance group can function as a single instance but not enverse? In that case, why creates a single instance? – David Cesar Santos Jun 16 '15 at 10:03
  • Simply, you don't always need to scale horizontally. For example, a primary/master instance don't need to scale horizontally if its purpose is only to schedule and prioritise tasks to slaves. – Wan B. Jun 16 '15 at 11:10
  • You are welcome. Please accept the answer when you have the chance. Cheers. – Wan B. Jun 16 '15 at 20:45