Load Balancing Microsoft_SQL_Server_Deployment_Brief
Load Balancing Microsoft_SQL_Server_Deployment_Brief
Server
Version 1.0.0
Table of Contents
1. About this Brief . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2. Loadbalancer.org Appliances Supported. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3. Software Versions Supported . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3.1. Loadbalancer.org Appliance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3.2. Microsoft SQL Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
4. Microsoft SQL Server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
5. Load Balancing Microsoft SQL Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
5.1. Read / Write Database Access. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
5.2. Virtual Service (VIP) Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
6. Deployment Concept . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
7. Load Balancer Deployment Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
7.1. Layer 7 SNAT Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
8. Loadbalancer.org Appliance – the Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
8.1. Virtual Appliance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
8.2. Initial Network Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
8.3. Accessing the Appliance WebUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Main Menu Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
8.4. Appliance Software Update. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Determining the Current Software Version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Checking for Updates using Online Update. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Using Offline Update . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
8.5. Ports Used by the Appliance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
8.6. HA Clustered Pair Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
9. Appliance Configuration for Microsoft SQL Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
9.1. VIP1 - MS-SQL-SERVER. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Configuring the Virtual Service (VIP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Defining the Real Servers (RIPs) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
9.2. Finalizing the Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
10. Testing & Verification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
10.1. Using System Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
10.2. Access the Database/Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
11. Technical Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
12. Further Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
13. Appendix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
13.1. Configuring HA - Adding a Secondary Appliance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Non-Replicated Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Configuring the HA Clustered Pair . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
13.2. SQL Server Health Check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
14. Document Revision History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
1. About this Brief
This brief outlines the steps required to configure a load balanced Microsoft SQL Server environment utilizing
Loadbalancer.org appliances. It covers the configuration of the load balancers and also any Microsoft SQL Server
configuration changes that are required to enable load balancing.
For more information about initial appliance deployment, network configuration and using the Web User Interface
(WebUI), please also refer to the Administration Manual.
Some features may not be available or fully supported in all cloud platforms due to platform specific limitations.
For more details, please refer to the "Main Differences to our Standard (Non-Cloud) Product" section in the
appropriate cloud platform Quick Start Guide or check with Loadbalancer.org support.
The screenshots used throughout this document aim to track the latest Loadbalancer.org
software version. If you’re using an older version, or the very latest, the screenshots presented
here may not match your WebUI exactly.
Various database synchronisation methods are supported, the most appropriate depends on the version of SQL
server, the read & write transaction workload, IT infrastructure and the available budget:
Replication - for more information refer to SQL Server Replication
Log shipping - for more information refer to About log shipping (SQL Server)
Mirroring - for more information refer to Database Mirroring (SQL Server)
Always On Failover Clustering - for more information refer to Always On Failover Cluster Instances (SQL
Server)
Always On Availability Groups - for more information refer to What is an Always On availability group
The configuration presented in this guide assumes that only read operations are supported, or the
synchronisation method in use allows read & write operations from/to any SQL server.
A more robust SQL Server health check can be used if preferred that reads and verifies data
from the database. For more details, please refer to SQL Server Health Check.
6. Deployment Concept
The load balancer can be deployed as a single unit, although Loadbalancer.org recommends a
clustered pair for resilience & high availability. Please refer to the section Configuring HA -
Adding a Secondary Appliance in the appendix for more details on configuring a clustered pair.
For Microsoft SQL Server, layer 7 SNAT mode is recommended. This mode is described below and is used for the
configurations presented in this guide.
Because layer 7 SNAT mode is a full proxy, any server in the cluster can be on any accessible subnet
including across the Internet or WAN.
Layer 7 SNAT mode is not transparent by default, i.e. the Real Servers will not see the source IP address of
the client, they will see the load balancer’s own IP address by default, or any other local appliance IP address
if preferred (e.g. the VIP address). This can be configured per layer 7 VIP. If required, the load balancer can
be configured to provide the actual client IP address to the Real Servers in 2 ways. Either by inserting a
header that contains the client’s source IP address, or by modifying the Source Address field of the IP
Layer 7 SNAT mode can be deployed using either a one-arm or two-arm configuration. For two-arm
deployments, eth0 is normally used for the internal network and eth1 is used for the external network
although this is not mandatory.
Requires no mode-specific configuration changes to the load balanced Real Servers.
Port translation is possible with Layer 7 SNAT mode, e.g. VIP:80 → RIP:8080 is supported.
You should not use the same RIP:PORT combination for layer 7 SNAT mode VIPs and layer 4 SNAT mode
VIPs because the required firewall rules conflict.
The same download is used for the licensed product, the only difference is that a license key file
(supplied by our sales team when the product is purchased) must be applied using the
appliance’s WebUI.
Please refer to Virtual Appliance Installation and the ReadMe.txt text file included in the VA
download for additional information on deploying the VA using the various Hypervisors.
The VA has 4 network adapters. For VMware only the first adapter (eth0) is connected by
default. For HyperV, KVM, XEN and Nutanix AHV all adapters are disconnected by default. Use
the network configuration screen within the Hypervisor to connect the required adapters.
Be sure to set a secure password for the load balancer, when prompted during the setup routine.
There are certain differences when accessing the WebUI for the cloud appliances. For details,
https://<IP-address-configured-during-the-network-setup-wizard>:9443/lbadmin/
You’ll receive a warning about the WebUI’s SSL certificate. This is due to the default self
signed certificate that is used. If preferred, you can upload your own certificate - for more
information, please refer to Appliance Security Features.
If you need to change the port, IP address or protocol that the WebUI listens on, please
refer to Service Socket Addresses.
Username: loadbalancer
Password: <configured-during-network-setup-wizard>
To change the password, use the WebUI menu option: Maintenance > Passwords.
3. If the latest version is already installed, a message similar to the following will be displayed:
4. If an update is available, you’ll be presented with a list of new features, improvements, bug fixes and security
related updates.
Do not navigate away whilst the update is ongoing, this may cause the update to fail.
6. Once complete (the update can take several minutes depending on download speed and upgrade version)
the following message will be displayed:
7. If services need to be reloaded/restarted or the appliance needs a full restart, you’ll be prompted accordingly.
Please contact [email protected] to check if an update is available and obtain the latest
6. If services need to be reloaded/restarted or the appliance needs a full restart, you’ll be prompted accordingly.
TCP 22 * SSH
The ports used for SSH, GSLB, SNMP, the WebUI, the fallback page, the gateway service and the
shuttle service can be changed if required. For more information, please refer to Service Socket
Addresses.
4. Set the Virtual Service IP Address field to the required IP address, e.g. 192.168.110.100.
For a simple check, leave Health Check set to Connect to Port.
For a more robust check, refer to the steps in SQL Server Health Check.
3. Define the Label for the real server as required, e.g. SQL-Server1.
4. Set the Real Server IP Address field to the required IP address, e.g. 192.168.110.160.
6. Click Update.
For Enterprise Azure, the HA pair should be configured first. For more information, please refer
to the Azure Quick Start/Configuration Guide available in the documentation library
The clustered HA pair uses Heartbeat to determine the state of the other appliance. Should the active device
(normally the Primary) suffer a failure, the passive device (normally the Secondary) will take over.
Non-Replicated Settings
A number of settings are not replicated as part of the Primary/Secondary pairing process and therefore must be
manually configured on the Secondary appliance. These are listed by WebUI menu option in the table below:
Local Configuration Network Interface Interface IP addresses, bonding configuration and VLANs
Configuration
Local Configuration System Date & time Time and date related settings
1. Deploy a second appliance that will be the Secondary and configure initial network settings.
2. Using the WebUI on the Primary appliance, navigate to: Cluster Configuration > High-Availability
Configuration.
3. Specify the IP address and the loadbalancer user’s password for the Secondary (peer) appliance as shown in
the example above.
Clicking the Restart Heartbeat button on the Primary appliance will also automatically restart
heartbeat on the Secondary appliance.
For more details on configuring HA with 2 appliances, please refer to Appliance Clustering for
HA.
For details on testing and verifying HA, please refer to Clustered Pair Diagnostics.
1. First, follow these steps to install the SQL Server health check on the load balancer.
2. Next, using the WebUI, navigate to Cluster Configuration > Health Check Scripts.
7. Click Update.
9. Scroll to the Health Checks section and change the Health Check to External Script.
10. Using the Check Script dropdown, select the health check script just created.
12. To apply the new settings, reload HAProxy using the button in the "Commit changes" box at the top of the
screen.
About Loadbalancer.org