Hi @Ashwan
I need to verify /prove how connection though group listener performance over connect using host name . Could you please advice any method of doing it. If how to check ,validate our group listener performance is up to the standard performance.
You want to prove using group listener performance over using host name? If more convenient and response faster are factors of performance. I think you just need to delete your current listener and then monitoring one AlwaysOn Failover ...
Suppose we have established the AlwaysOn scheme as follows. The Availability Group is called testAG, and it has three availability replicas, Denali1, Denali2, and Denali3, as shown in Figure 1.
Denali1 is now the primary replica, and the availability group contains two databases: testdb1 and testdb2. There is also a database nonAGdb on Denali1 that does not belong to any availability group. On the two secondary replicas Denali2 and Denali3, there are only two availability databases, testdb1 and testdb2, and no other databases.If you only set it in this way(not using one listener), you can only see one resource in the Windows Failover Cluster Manager, the availability group resource. But the SQL client cannot use the name of this resource to log in to SQL Server. They must know the instance name of the current master copy and use this name to connect to SQL Server. Once an AlwaysOn failover occurs, you need to redirect the application to the new primary copy by modifying the application's connection string, adding aliases, etc. In the above example, the user needs to use the name Denali1 to connect at the beginning. If AlwaysOn fails over and switches to Denali2, then all users must use the name Denali2 to connect. This is very inconvenient. In order to allow the application to transparently connect to the primary replica without being affected by failover, you need to create a Listener. A Listener contains three elements: virtual IP address, virtual network name (DNS name), and port number. After the Listener is created, virtual IP address and virtual network name resources are added to the availability group resources. The application connects to the virtual network name instead of the instance name of the primary replica to access the primary replica instance and the database running on it, which is very similar to a failover cluster. Unlike a failover cluster, in addition to the virtual network name, the real instance name of the master copy itself can still be used to connect to this instance.
Still the above example. We can create a Listener whose name (ie virtual network name) is testAGvname. As can be seen from Figure 2, SQL Server Management Studio can either use the name Denali1 or testAGvname to connect to SQL Server. After connecting to SQL Server with testAGvname, in addition to the database in the availability group, you can also see nonAGdb, which proves that you have connected to the copy of Denali1 through testAGvname.
More information: sql-server-always-on-listeners
If the reply is helpful, please do “Accept Answer”.
BR,
Mia