0

Is there any options in Google cloud autoscaler for marking some number of instances as permanent which shouldn't be destroyed by autoscaler?

In my use case, I need to run some instances all the time (which also serve the critical data) and only scale up/down when traffic load increases/decreases.

slal
  • 23
  • 1
  • 8

1 Answers1

0

Your request has got some discrepancy as you are speaking about instance group that contains some instances that will serve different data than the other,this means that the instance are not identical each other therefore you can't use the autoscaler. I'm saying this because there are two type of instance group, one is "Unmanaged instance groups" and the other "managed instance groups". The unmanaged instance group would suite for you as it gives the option to use different instances but there is not autascaler. Instead the managed instance groups is based on a group that uses an instance template to create a group of identical instances.

Alessio
  • 173
  • 8
  • Thanks for the comment. The instances are absolutely identical in my use case. The reason for having permanent instances is that there is regular mysql database dump being taken daily on permanent instances and it has to be imported into the new instances so that whole group remain in sync. There is one suggestion that two managed instance group could solve this case. One instance group would have only permanent instances without autoscaler and other would the temporary instance group used with autoscaler. Would this setup work with load balancer with two backends to serve the same traffic? – slal Apr 16 '18 at 14:23
  • Yep I could confirm the option of having two different instance-group behind a load-balancer could work as long as you will manage to get all instance synced between echo other. Any way what I suggest to you is not deploying db inside those instance instead just create a db cluster out side of the instance group the redirect the traffic from the instance group to the DB cluster. – Alessio Apr 17 '18 at 10:52
  • My use case requires stable performance based on db queries due to the strict SLAs so creating db cluster might not help as it can't scale up automatically if the database response time is too slow because of too much requests. I have a problem using load-balancer doesn't allow to server same traffic for two different instance-group in backend because of conflict with same path pattern. Any help? – slal Apr 17 '18 at 14:03
  • In term of high performance I would definitely suggest to go for Cloud SQL instance then use the sql proxy (not ip based) inside of your instance-group's instances. It is really difficult to me imagine a correct and fast DB sync on several instance running on an instance group. The sync process between all those instance can turn as bottle neck. – Alessio Apr 17 '18 at 15:29