0

I am using google cloud load balancer to Auto scale instances in GCP. I have setup a Instance group of max 6 instances. When a instance is created, it runs a startup script (To install nginx, php, mongo, psql, composer, clone project).

Google Cloud load balancer forwards request to new instances firing up before the completion of automation script.

Is there a way to forward the request only after the Startup script has completed ?

LEXTRA33
  • 101
  • 2

1 Answers1

0

The workaround I can think of in this situation is the cool down period. According to this document,

The cool down period is the number of seconds the autoscaler should wait after a virtual machine has started before the autoscaler starts collecting information from it.

Editing instance group for Cool-down period

However, it will be required to find out what value to put in this field which will give enough time for the new instances to fire up completely.

Taher
  • 195
  • 8