question

sakuraime avatar image
0 Votes"
sakuraime asked sakuraime commented

Always-on Cluster : isalive check vs leasetimeout

SQL Server AAG has a resource register at Windows failover cluster . This resource, has isalive check and also leasetimeout check . What about the difference between two ?

sql-server-general
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Cathyji-msft avatar image
0 Votes"
Cathyji-msft answered Cathyji-msft converted comment to answer

Hi @sakuraime,

Is-Alive mechanism

The Is-Alive check is between WSFC and SQL Server. The SQL Server Always on resource DLL uses the sp_server_diagnostics stored procedure for the health of SQL Service. The stored procedure reports the status for the system, resource, IO subsystem, query processing and events. It uses a FAILURE_CONDITION_LEVEL for implementing defining a condition in which automatic failover can happen.

Lease Timeout

The Lease Timeout is between the SQL Server resource and SQL Server Availability Group. The lease is a simple handshake between the resource DLL and the SQL Server instance supporting the AG on the same node.

Refer to below links.

Lease Timeouts and Health Checks in SQL Server Always On Availability Groups
How It Works: SQL Server AlwaysOn Lease Timeout


If the response is helpful, please click "Accept Answer" and upvote it, as this could help other community members looking for similar queries.




· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

seems it's 3 different concept

iwhat I mention 'isalive' check is the following
114174-image.png


sp_server_diagnostics and leasetimeout is the following
114136-image.png


0 Votes 0 ·
image.png (52.2 KiB)
image.png (41.7 KiB)
Cathyji-msft avatar image
0 Votes"
Cathyji-msft answered sakuraime commented

Hi @sakuraime,

Before SQL 2012, what Isalive did was very simple. The Windows cluster service would use TCP/IP or Named Pipes to connect to the SQL Server cluster instance. After connecting, run a command "select @@servername".

The SQL Server 2012 cluster uses a brand new Resource DLL (the name is still sqsrvres.dll). In the new Resource DLL, the looksalive check basically maintains its original function, but the Isalive check method has changed. The new Isalive not only relies on checking the connectivity between the cluster service and SQL Server to judge the health of SQL Server, it also relies on SQL Server for internal self-diagnosis and reports the diagnosis results to Resource DLL. The new Resource DLL instead executes a brand new stored procedure "sp_server_diagnostics" to perform Isalive checks to determine the health of the server.


If the response is helpful, please click "Accept Answer" and upvote it, as this could help other community members looking for similar queries.



· 6
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

so this page is useless for AAG environment ? especially for 'Basic resource health check interval'

115605-image.png


0 Votes 0 ·
image.png (151.4 KiB)

any idea for it ?

0 Votes 0 ·

so May I know this 'Basic resource health check internal' for AAG resource already replaced by lease timeout checking ? or sp_server_diagnostics?

what about

117807-image.png


0 Votes 0 ·
image.png (22.1 KiB)
Show more comments