-1

I am setting up a release pipeline and I wanted to use the Azure Network Load Balancer task to take instances out of the load balancer, but I wanted to know how it does it, i.e. does it drain connections or kill connections.

I am guessing that if it's removing the network interface it's just killing connections, can anyone tell me?

Phil
  • 765
  • 2
  • 8
  • 26
  • Not get your response for several days, would you please share your latest information about this issue? If you have any concern, feel free to share it here. – Hugh Lin Mar 25 '21 at 02:11

1 Answers1

0

According to the source code on github, the connect action adds loadBalancerBackendAddressPools porperty (The reference to LoadBalancerBackendAddressPool resource). It is actually set by calling Network Interfaces-Create Or Update rest api.

if (action == "Connect") {
        taskinternal._writeLine(tl.loc("ConnectingVMtoLB", loadBalancerName));
        var lb = await nlbUtility.getLoadBalancer(SPN, endpointUrl, loadBalancerName, resourceGroupName);
        nicLbBackendPoolConfig = lb.properties.backendAddressPools;
}
else {
        taskinternal._writeLine(tl.loc("DisconnectingVMfromLB", loadBalancerName));
}
nicVm.properties.ipConfigurations[0].properties['loadBalancerBackendAddressPools'] = nicLbBackendPoolConfig;
var setNIStatus = await nlbUtility.setNetworkInterface(SPN, endpointUrl, nicVm, resourceGroupName);
Hugh Lin
  • 17,829
  • 2
  • 21
  • 25