DH2i DxEnterprise 21.0 Software: Extended Vhosts for AG Quick Start Guide
Extended Vhosts for AG
This guide describes how to add an Extended Vhost (exVhost) to a DxEnterprise cluster and then add an availability group to the exVhost. DxEnterprise supports two types of Vhosts: Vhosts, which have nodes as members, and exVhosts whose members consist of other Vhosts. The exVhosts are designed for running an availability group (AG) across multiple HA instances. This gives users the ability to have HA on both the primary replica and secondary replicas for the AG while providing independent health monitoring and failovers of the HA instances and the AG.
NOTE: This doc covers the deployment of three AG replicas. When deploying availability groups, please consider the Microsoft SQL Server quorum requirements for automatic failover described in this KB: Quorum Considerations for SQL Server Availability Groups.
Add an exVhost
To configure an exVhost, DxEnterprise HA instances will need to be configured beforehand. For more information on configuring an HA instance, please see the DxEnterprise Administration Guide under the section titled Add a Virtual SQL Server Instance.
NOTE: For SQL Server on Linux, SQL Server 2019 CU9 or later will need to be installed and virtualized.
- Right-click on DxCluster and select Add virtual host.
- Add the name for the exVhost.
- Add the virtual IP for the exVhost. If no virtual IP is required, then supply “*127.0.0.1” to assign the local loopback address to the exVhost.
- OPTIONAL: Add a probe port for internal load balancer probing.
- Under Member Type, select VHOST.
- Add the desired Vhost members from the Available Members list to the Selected Members list.
Run the dxcli cluster-add-vhost command.
dxcli cluster-add-vhost <vhost> <vips> <nodes | VHOST:vhosts> [autofailback] [1-5] [ilbports]
|vhost||The name of the Vhost.||True|
|vips||The virtual IP(s) for the Vhost (comma separated list for multiples).||True|
|nodes | VHOST:vhosts||The node(s) or Vhost(s) to add (comma separated list for multiples).||True|
|autofailback||Set autofailback or leave blank if autofailback is not desired.||False|
|priority||The priority order of failover between Vhosts (1 is the highest and 5 is the lowest).||False|
|ilb_ports||Ports to use for internal load balancer probing (comma separated list for multiples).||False|
dxcli cluster-add-vhost exvhost1 10.1.200.101 VHOST:vhost1,VHOST:vhost2,VHOST:vhost3 false 1 40001
Add an Availability Group to an exVhost
- Right-click on the exVhost and select Add availability group.
- Add a name for the AGS.
- OPTIONAL: Select the Tunnel checkbox to automatically create tunnel connections between AG members. This is applicable for cross-site, cross-domain cluster topology joined through the DH2i Matchmaking Cloud service (match.dh2i.com). If Tunnel checkbox is checked, tunnel ports are automatically assigned and visible in the UI. These automatic values can be changed in the dialog if desired.
- Verify that the correct instances are selected for each Vhost.
- Set the desired mirroring port (default is 5022).
- Verify that the correct Availability Mode is selected for each Vhost.
- OPTIONAL: Click Authenticate to enter credentials for AG management on each replica. By default, DxEnterprise will create and manage the Availability Group using the same credentials as the underlying HA instance. Authenticating via different credentials on this dialog will instead use the provided credentials for AG creation and management.
- Click OK to commit the changes
Run the dxcli add-ags command.
dxcli add-ags <vhost> <ags_name> <param1> <param2> <...> <param1> : <node_name|instance_name|sql_login|sql_pass|mirror_port|availability_mode|[tunnel_port]> <param2> : <node_name|instance_name|sql_login|sql_pass|mirror_port|availability_mode|[tunnel_port]> <...> : <node_name|instance_name|sql_login|sql_pass|mirror_port|availability_mode|[tunnel_port]>
|vhost||The name of the Vhost.||True|
|ags_name||The name of the availability group.||True|
|param1||A set of parameters for the primary replica in the availability group.||True|
|param2||A set of parameters for the secondary replica in the availability group.||True|
|…||A set of parameters for each additional replica in the availability group.||False|
|node_name||The name of the primary replica member.||True|
|instance_name||The name of the instance.||True|
|sql_login||Leave blank to use credentials from underlying HA instance. Or, enter different login for DxEnterprise to use for AG management. The SQL Server login can be any SQL login or Windows domain account that has been assigned the sysadmin role for the instance being managed. When supplying a domain account, the username needs to follow the UPN format (for example: firstname.lastname@example.org).||True|
|sql_pass||Leave blank if utilizing credentials for underlying HA instance. Or, if entering different credentials per the above, the password for the user (encrypted using dxcli encrypt-text).||True|
|mirror_port||The mirroring port to use for the availability group (default is 5022).||True|
|availability_mode||synchronous_commit, asynchronous_commit or configuration_only||True|
|tunnel_port||The port to be used for tunnel connections (for cross-site, cross-domain replication).||False|
dxcli add-ags exvhost1 ags1 "VHOST:vhost1|instance1|||5022|SYNCHRONOUS_COMMIT" "VHOST:vhost2|instance2|||5022|SYNCHRONOUS_COMMIT" "VHOST:vhost3|instance3|||5022|SYNCHRONOUS_COMMIT"