IIS does not "gracefully" close connections during a schedule shutdown. User sessions will be reset and if you're not managing the BIG-IP, sessions will still be sent to the downed server node until the BIG-IP virtual server monitor marks it as down and redistributes the traffic to other nodes. Mind you, most IIS monitors/service monitors will notice quickly but since it's user defined, I'd figure I'll call it out.
To reduce or mitigate this issue, you want to mark the node as offline either manually within the GUI or through BIG-IP's API call like (iControlREST). This will prevent new connections from routing to the server about to undergo maintenance and allow existing sessions to drain off and redistribute as needed.
The exception is long established sessions can persist for longer than you would want. In those cases, sometimes you'll need to force the connection offline by marking the node "Forced Offline" in BIG-IP. This will reset existing connections and distribute new connections to other nodes. This is not desirable but it's better than resetting IIS and allowing connection resets while the BIG-IP monitor fails X times before marking the node as down.
So here's your order of operation:
- Mark the node as disabled.
- Allow X time to drain active sessions to other IIS nodes
- Mark the node as Force Offline if any sessions remain active for too long (dependent on application expected use)
- Do whatever you need to for IIS
- Bring IIS back up and validate running before marking the pool member (node) online in BIG-IP.
And this can be automated in BIG-IP either with on box scripts or API calls from secure management systems.
You can monitor the traffic to your node in BIG-IP (within the virtual server statistics) or through your preferred management software. This will allow you to determine existing connections per node.
Here is your how-to guide on GUI and CLI commands to achieve what you're looking for:
K13310 - K13310: Disabling nodes or pool members for maintenance