Playing with AG setup I have the WSFC up and configured with two nodes in one availability group called DevClusterOnline. Both nodes (DEV-AWEB5 primary, DEV-AWEB6 secondary) are running Windows Server 2008 R2.
If I check the health of my AG I get this:
Running the query below will return this result set:
select ar.replica_server_name, availability_group_name = ag.name, ar.availability_mode_desc, ar.failover_mode_desc from sys.availability_replicas ar inner join sys.availability_groups ag on ar.group_id = ag.group_id order by availability_group_name, replica_server_name;
If I disconnect DEV-AWEB5, I cannot connect to the Group Listener (DevListener), but I can ping it and it will respond to my ping. The replica - DEV-AWEB6 goes into a RESOLVING state and my DB is unaccessable. I can however, manually go into Management Studio and set Failover to DEV-AWEB6 and then I´m up and running again and DevListener will once again accept connections.
Considering that these facts confirm that the failover actually works, that I have synchronized commits and automatic failover configured I have no idea what if malfunctioning in my setup.
When I disconnect DEV-AWEB5 I expect that my replica will retain connection and thus, DevListener too. I expect that the automatic failover will allow me to connect to the AG Listener transparently. From an end-user perspective, using a Web system it should not be noticable that one of the DB servers go down.
I am stuck here, can anyone please enlighten me on what I am doing wrong?