0

I have a question related to azure auto scaling, when load/stress, increased the instances will scale out and after the scale out if another user connected with one of the instance in the same scale set and in a few minutes, let's say load decreased and in that case scale-in will start and it might possibly the 2nd user will be kicked out since he was connected with one of the instance which was scaled-in/destroyed automatically.
Is there any way to stop the scale-in for that particular instance where a user is connected and he is performing his task?

mysanj
  • 117
  • 1
  • 12

1 Answers1

1

I think there is no way to stop the scale-in when it is started. But as I know, the scale operation is orderly. When scale-in, the instances with the highest IDs are removed first. For more details, see FAQ of Scale Set, and the question "If I reduce my scale set capacity from 20 to 15, which VMs are removed".

So I suggest the 2nd user can use the instance with smallest IDs in a plan. This will avoid being kicked out as much as possible.

Charles Xu
  • 29,862
  • 2
  • 22
  • 39
  • How we can restrict a user to use a specific VM. In my case I have scale set VMs behind load balancer. – mysanj Jan 24 '19 at 19:26
  • You can select one instance with the smallest ID, for example, the first one that ID 1. If scale-in, it must be removed at the end. And for access to the scale set VM, just add a NAT rule for the instance. See [Inbound NAT rules](https://learn.microsoft.com/en-us/azure/load-balancer/tutorial-load-balancer-port-forwarding-portal#create-an-inbound-nat-port-forwarding-rule). – Charles Xu Jan 25 '19 at 01:09
  • Hmm... This is not possible on VM level in scale set. It will imply on whole scale set. – mysanj Jan 25 '19 at 15:53
  • 1
    I don't agree with you. You can use the NAT rule to connect each instance of the VM scale set. See [Connect to a VM in the scale set](https://learn.microsoft.com/en-us/azure/virtual-machine-scale-sets/quick-create-portal#connect-to-a-vm-in-the-scale-set). – Charles Xu Jan 27 '19 at 13:48
  • After following your recommendation, I was able to solve this issue, thanks @Charles Xu – mysanj Jan 30 '19 at 05:49
  • @mysanj If the answer works to you. Then you can accept it as the answer. – Charles Xu Feb 01 '19 at 02:01