Determining Cluster Node

Every once in a while I get asked, “How does one determine what node of the cluster the currently running code is on?” One of the easier way to find out is to poll the registry.

<cfregistry branch=”HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControl ComputerNameActiveComputerName”
action=”get” type=”string” entry=”ComputerName” variable=”ComputerName”>

2 thoughts on “Determining Cluster Node

  1. Doesn’t look like that’s right. Each of my cluster nodes (xx1a, xx1b) reports its own name in the ActiveComputername, but only 1b is really active. I would have expected xx1a to report xx1b as the activecomputername.

    Like

Leave a comment