UserControl
UserControl

Reputation: 15159

Understanding heartbeat in ASP.NET health monitoring

Who's triggering the event? What are consequences/benefits of enabling it in <healthMonitoring enabled="true" heartbeatInterval="30"> except it appears every 30 seconds in the logs? Has it anything to do with NLB heartbeat? What interval is better for production use?

Upvotes: 3

Views: 6180

Answers (1)

Edwin de Koning
Edwin de Koning

Reputation: 14387

Enabling it in this way in the web.config will cause the Application Domain to raise a WebHeartbeatEvent periodically (in your case every 30 seconds), basically to check if your application is 'still alive' (like checking a human's heartbeat). You can specify additional rules like this:

<healthMonitoring enabled="true" heartbeatInterval="100">
  <rules>
    <add name="Heart Beat Events"
      eventName="Heartbeats"
      provider="EventLogProvider"
      profile="Default"
      minInterval="00:01:00" />
  </rules>
</healthMonitoring>

Specifying 'EventLogProvider' will cause the events to be logged to the EventLog, but you could also write your own Provider, see here.

It has nothing to do with the NLB heartbeat by the way, which is only used for Load Balancing purposes.

Upvotes: 4

Related Questions