question

Jimi-4171 avatar image
Jimi-4171 asked ·

Possible to tell a scale set or application gateway which vm instance to use?

Hi,

When testing new big features I sometimes have the need to quickly switch between two different "versions" of a virtual machine in a scale set. But since our current (test env) setup uses bare bone Ubuntu images and configures everything using a custom script, it takes quite a long time to create a new instance. So, if possible, I would like to be able to tell the scale set (or application gateway) which specific instance it should use for all incoming traffic. That way I can have both instances alive at the same time, and quickly switch back end forth when testing things.

I'm not interested in setting up multiple scalesets or application gateways, since I want all other components in the environment to use the same configuration, pointing to the same application gateway, and I don't want to have to do any configuration changes in all these components in order to achieve this switch.

So, does the scaleset or the application gateway offer any opportunity like this?
Is it perhaps possible to achive using the health check? If I can make sure that only one of the two instances returns a 200 OK for the health checks, can I then make it direct all traffic to the other one without the scale set automatically tearing down the "unhealthy" instance? Maybe there is a setting to disable this "kill any unhealthy instance" feature? Or is it possible to configure it in such a way that it takes maybe 1 or two "unhealthy" health check responses for it to remove the instance from the load, but let say 1000 "unhealthy" health check responses before it actually kills the instance?

Regards

azure-virtual-machines-scale-set
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

jakaruna-MSFT avatar image
jakaruna-MSFT answered ·

VMSS is meant to run the same image multiple times. Your requirement is not possible and not recommended as well.

Easisest solution would be to deploy your new software on a new VM or a new VMSS and add that on the app gateway.

for example in app gateway,

test.app.com can go to the single Vm or the test VMSS which you created for testing

prod.app.com can go to the regular VMSS.

1 comment Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

And what if there was some strange problem that you want to troubleshoot on one specific instance, and you want to keep that one running but not get any more traffic?

0 Votes 0 · ·