Check what network load balancer node is working. RRS feed

  • Question

  • Hello,

    I have a network load balancer on Windows Server 2012 R2 with 2 nodes; on these nodes I have installed IIS and have some sites on port 90, 91, 92: how can I check what node is working on those ports? I set the nlb so that it works like a cluster in active/passive mode.

    For example, if I start netstat on one node I can see on a port, for example 90, that there are connections established, close_wait, time_wait on that port while on the second node I don't see any activity (and this is correct).

    Any help is appreciated.



    Marco Mangiante

    Friday, January 26, 2018 1:54 PM

All replies

  • For IIS issues post here http://forums.iis.net


    Friday, January 26, 2018 6:01 PM
  • Hello

    thanks for the reply. I'll do it, but maybe it is a control that is possible even without considering that on those ports there are some web sites (I suppose).



    Marco Mangiante

    Saturday, January 27, 2018 12:46 PM
  • Hello,

    finally I resolved; I have created a custom header in the web.config with key/value "WebServer/[node_number]" where [node_number] is a placeholder for the number 1,2 or other; for example, the portion of the web.config on one node is:

    			<add name="WebServer" value="1" />

    To retrieve in PowerShell the value I have done this:

    $response = iwr "http://nlb_ip" -UseBasicParsing -Method Head
    if ($response.Headers["WebServer"] -eq "1") {
        Write-Output "Node1"
    } else {
        Write-Output "Node2"

    Hope this can help someone that have found my same problem.



    Marco Mangiante

    Monday, January 29, 2018 12:30 PM
  • Hi,

    Good to hear that you have solved this issue by yourself. In addition, thanks for sharing your solution in the forum as it would be helpful to anyone who encounters similar issues.

    If there is anything else we can do for you, please feel free to post in the forum.

    Best Regards,

    Please remember to mark the replies as an answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Tuesday, January 30, 2018 6:10 AM