Build a SQL Failover Cluster


In this blog post I will try to cover the SQL failover cluster installation process. Most of the Microsoft enterprise software uses a database to store the data. SQL Server instance hosts the database & the applications are totally dependent on the database. So, it like if the database goes down or the SQL instance goes down the application stops working. The downtime in this case can be minimized by building a SQL failover cluster which will make the SQL instance highly available.

How the SQL cluster is made Highly Available ?

To make the SQL cluster highly available we first need to create a failover cluster on Windows Server 2008/2012/2012 R2/2016 & then host the SQL service on top of that. A failover cluster in Windows server is a group of two or more servers. These servers are called as nodes.

The SQL service are hosted in these nodes & the high availability of the SQL instance is achieved by always transferring the service to a working node in the case of a node failure (server down due to maintenance or any other reasons).  

Below mentioned diagram explains it in detail :-

Cluster Architecture:-
Above cluster is called a two node cluster.
Cluster Nodes:-
·       Node 1
·       Node 2
Node 1 & Node 2 Configuration:-
·       Windows server 2016.
·       Failover cluster feature installed.
·       Shared Disc added to the system using iscsi initiator.
Shared Storage Machine:-
·       Windows Server 2016.
·       ISCSI Target role installed.
·       A Disk for Shared Storage added to the machine (This can be a disk of any configuration).
Network :-

The cluster configuration requires two network to function the first network is the internal network which connects both the nodes for heartbeat & the second network is the domain network which connects the node to the storage. In the above diagram the internal network is the one created for connection both the nodes for heartbeat & the external node connects the cluster to storage.

Some of the Terms that are common in cluster environment :-

ISCSI initiator
ISCSI Target
Shared Volumes

Now, We have a basic understanding of what cluster is so, lets proceed with the installation,
Here are the steps :-

1. Planning the requirement - Check the requirements of the application & how many nodes needs to be in the cluster.
2. Plan & configure the Storage server.
3. Install Windows Server 2008/2012/2012 R2/2016 on the basis of the nodes.
4. Install & Configure failover cluster service on these nodes.
5. Install SQL instance on the nodes. 

Step-by-step process -

1. Planning the requirement -

Planning the requirements for the cluster is mostly dependent on the application. If it's a mission critical app then the cluster should have more number of nodes to host the SQL service.

Disks requirements also depends on the application & depending upon that the storage server can be created.

2. Plan & configure the Storage server.  

After proper planning of storage is done based on the application requirements. Lets now proceed with the storage server installation.


No comments:

Post a Comment