Date post: | 16-Apr-2017 |
Category: |
Technology |
Upload: | mark-broadbent |
View: | 740 times |
Download: | 1 times |
Mark Broadbent
Principal Consultant
SQLCloud
SQLCLOUD.CO.UK
Schizophrenic High Availability
with SQL
and
Windows
2016
Copyright © 2015, SQLCloud Limited. Please do not redistribute, republish in whole or in part without prior permission of content owner. www.sqlcloud.co.uk
About
Mark Broadbent.“30 billion times more intelligent than a live mattress”Microsoft Certified Master/ Certified Solutions Master: SQL Server
Microsoft Data Platform MVP
Principal at SQLCloud
Email: [email protected]
Twitter: retracement
Blog: http://tenbulls.co.uk
Event Lead to the UK’s first ever SQLSaturday (Cambridge)
– now also SharePoint Saturday
Event #4 on 8/ 9/ 10th Sept 2016 (pre-cons & Community day)
http://sqlcambs.org.uk
Copyright © 2015, SQLCloud Limited. Please do not redistribute, republish in whole or in part without prior permission of content owner. www.sqlcloud.co.uk
Agenda
Virtualization
3
ClusterStorage
2
Import generic
Import generic
Import generic
The Road to Schizophrenic HA
1
The best part of the presentation… Gin-O-Clock
5New and Cool HA
features
4
Copyright © 2015, SQLCloud Limited. Please do not redistribute, republish in whole or in part without prior permission of content owner. www.sqlcloud.co.uk
In the beginning…
Copyright © 2015, SQLCloud Limited. Please do not redistribute, republish in whole or in part without prior permission of content owner. www.sqlcloud.co.uk
Schizophrenic HADR
Serial Attached SCSIFibre Channel iSCSI
Import generic
Import generic
Import generic
SMB 3.0 Fileshare
Serial ATA is not supportedfor cluster shared storage
?
??
?
?
?
Copyright © 2015, SQLCloud Limited. Please do not redistribute, republish in whole or in part without prior permission of content owner. www.sqlcloud.co.uk
SQL Failover Clustering
• Clustered Application/ resource, active on one node at a time
• Requires Windows Cluster and a Windows Cluster which requires single Windows Domain
• Storage visibility
• Support multi-site/subnets but with considerations• Quorum• Storage replication• Subnet IP or dependency• WAN reliability
Cluster Shared StorageSubnet 1 Subnet 2
Copyright © 2015, SQLCloud Limited. Please do not redistribute, republish in whole or in part without prior permission of content owner. www.sqlcloud.co.uk
Availability Groups
• SQL now standalone but still requires Windows Cluster (quorum and HA components) -remember the single domain
• Read-only routing of read-only queries directed only to first available replica
• Support multi-site/subnets but with considerations• Quorum• Storage replication• Subnet IP or dependency• WAN reliability, Latency (log stream inefficiency)
Primary Replica
Subnet 1 Subnet 2
Availability Group Resource
Currently no MSDTC and cross database transaction
support in AG …but….
Secondary Replica
ReplicaDatabases
Listener
async
sync
Availability group secondariesmay be readable replicas
Copyright © 2015, SQLCloud Limited. Please do not redistribute, republish in whole or in part without prior permission of content owner. www.sqlcloud.co.uk
Cluster Shared Volumes for SQL FCIs
• Supported by SQL Server 2014 on Windows 2012 R2 (introduced in Windows 2012)
• Consolidation of multiple SQL instances
• Large FCI cluster deployments could run out of drive letters
• Consolidating multiple SQL instances on single LUN makes the storage utilization more efficient
• Fast failover – no dismount and mount during failover!
• Easier to configure and more resilient• Zero downtime chkdsk
• Resilience from network failures (CSV can reroute traffic over the network using SMB 3.0 allowing the SQL instance to remain operational
• Good for Hyper-V Cluster Storage but consider performance hit from redirected IO
Copyright © 2015, SQLCloud Limited. Please do not redistribute, republish in whole or in part without prior permission of content owner. www.sqlcloud.co.uk
SMB 3.0 File Shares
• SMB 3.0 supported by Hyper-V Windows 2012/R2 & SQL 2012/2014
• Not assigned to the Cluster
• Cannot be added to Cluster Shared Volumes
• Very easy to configure and consume
• Low cost connectivity
• No Filestream support Failover Cluster
File Server
Copyright © 2015, SQLCloud Limited. Please do not redistribute, republish in whole or in part without prior permission of content owner. www.sqlcloud.co.uk
Scale-Out File Server Cluster
Failover Cluster
HDD3TB
HDD3TB
HDD3TB
HDD3TB
HDD3TB
HDD3TB
HDD3TB
HDD3TB
HDD3TB
HDD3TB
HDD3TB
HDD3TB
SSD600GB
HDD3TB
HDD3TB
HDD3TB
RDMA Cards
HBA Storage Adapters
JBOD Array
SMB Multichannel
SMB Direct RDMA
Continuous Availability File Share
Cluster Shared
Volumes
MultipathIO
Storage Spaces
FailoverClustering
Scale-Out File Server
Infiniband Switches
Copyright © 2015, SQLCloud Limited. Please do not redistribute, republish in whole or in part without prior permission of content owner. www.sqlcloud.co.uk
Microsoft Storage Spaces Direct
• Utilize high speed NVMe local storage or SATA
• Eliminate need for shared SAS Fabric
• Perfect for Hyper-V• Disaggregated deployment (needs SoFS) or Hyper-converged stack
• Create Storage tiers
Copyright © 2015, SQLCloud Limited. Please do not redistribute, republish in whole or in part without prior permission of content owner. www.sqlcloud.co.uk
Hyper-V scalability limits
Guest
• 64 vCPUs
• 1 TB Memory
• 64 TB VHDX virtual disks
• 4 Virtual Fibre Channel Adapters
• 12 Virtual NICs
Host
• 320 Logical processors
• 1024 virtual machines per host
• 4 TB Memory
Copyright © 2015, SQLCloud Limited. Please do not redistribute, republish in whole or in part without prior permission of content owner. www.sqlcloud.co.uk
Hyper-V Benefits
• Replication
• Exports
• Live Storage Migration
• Live Migration
• Quick Migration
• Checkpoints (snapshots)
• QoS on disks, Bandwidth, CPU etc
• Fast Boot
• Azure portability *1
*1 Generation 2 Machines not compatible (although ASR can support)
Copyright © 2015, SQLCloud Limited. Please do not redistribute, republish in whole or in part without prior permission of content owner. www.sqlcloud.co.uk
Ph
ysical Infrastru
cture
Gu
est Clu
ster
Hypervisors
Guests
Hyper-V Cluster
SQL Server Cluster
Storage Fabric
Guest Clustering on a Hyper-V Cluster
• Clustered Virtual Machines on Hyper-V cluster
• SQL Clustered Instance can failover to each VM in the Guest Cluster
• Guest VM benefits from “Clustered Live Migration” in Hyper-V
HDD3TB
HDD3TB
HDD3TB
HDD3TB
HDD3TB
HDD3TB
HDD3TB
HDD3TB
HDD3TB
HDD3TB
HDD3TB
HDD3TB
SSD600GB
HDD3TB
HDD3TB
HDD3TB
Copyright © 2015, SQLCloud Limited. Please do not redistribute, republish in whole or in part without prior permission of content owner. www.sqlcloud.co.uk
Stretch Database
EXEC sp_configure 'remote data archive', 1;GORECONFIGURE
Single trickle thread (for now)Automatically move cold table data to azure (row predicate should be possible)Transparently query across table & Azure
orders
id status
1 0
2 2
3 1
4 0
Trickle thread
Copyright © 2015, SQLCloud Limited. Please do not redistribute, republish in whole or in part without prior permission of content owner. www.sqlcloud.co.uk
SQL XI
• Data/ log files in Azure
• Bypass Azure limit of 16 VM disks
• Performance benefits to Virtual disks• Bypasses Virtual Disk driver and passes through virtual network driver
• Cloud Portability
Copyright © 2015, SQLCloud Limited. Please do not redistribute, republish in whole or in part without prior permission of content owner. www.sqlcloud.co.uk
DEMOHyper-V Live Migration, Stretch DB and SQLXI
Copyright © 2015, SQLCloud Limited. Please do not redistribute, republish in whole or in part without prior permission of content owner. www.sqlcloud.co.uk
Azure Cloud Witness
• Windows 2016 Quorum Configuration• Use Storage account name
• Primary or secondary key
• (optional) specify service endpoint
• Azure Witness uses HTTPS REST so https port must be open on all cluster nodes
• If regenerating access key, first rotate to secondary/ primary
• Set storage account to “Locally Redundant” for Replication Type
Azure blob storage
Azure blob storage
msft-cloud-witness
Copyright © 2015, SQLCloud Limited. Please do not redistribute, republish in whole or in part without prior permission of content owner. www.sqlcloud.co.uk
Direct Seeding
• Based on Azure Database seeding
• Group seeding per replica (manual seeding possible)
server1
server2
server3
File Server
TCP 5022 TCP 5022Replica backup stream
Backup stream
Restore stream
Availability Group
Copyright © 2015, SQLCloud Limited. Please do not redistribute, republish in whole or in part without prior permission of content owner. www.sqlcloud.co.uk
Read only routing - load balancing
• Read only routing list configured on primary role
• Applications must• Connect through Listener
• Connection string must specify Application Intent=ReadOnly
• Parentheses identifies load balanced set
READ_ONLY_ROUTING_LIST=((‘server2’,‘server3’,‘server4’),‘server5’,‘server6’)
server1 server2 server3 server4 server5 server6
Copyright © 2015, SQLCloud Limited. Please do not redistribute, republish in whole or in part without prior permission of content owner. www.sqlcloud.co.uk
Basic Availability Groups
• Standard Edition (or Enterprise)
• 2 replicas (configured on setup)• No upgrade to advanced AG
• Cannot add or remove replicas
• No support for replicas prior to 2016
• Sync or Asyc
• No offloaded backups and no readable replica (snapshot possible)
• 1 Availability Group with 1 Database replica
Copyright © 2015, SQLCloud Limited. Please do not redistribute, republish in whole or in part without prior permission of content owner. www.sqlcloud.co.uk
Domain-Independent Availability Groups
• Nodes must run Windows 2016
• Needs Failover Clustering Feature and DNS
• Intra-cluster communication via certificates
• Failover Cluster Manager GUI unsupported
• No Active Directory
New-Cluster -Name cluster3 -Node server11,server12,server13 -AdministrativeAccessPoint DNS
server11 server12 server13
Workgroup1 Workgroup1
Cluster 3
Copyright © 2015, SQLCloud Limited. Please do not redistribute, republish in whole or in part without prior permission of content owner. www.sqlcloud.co.uk
Distributed Availability Groups
• Cross cluster Availability Groups
• Addresses Site-to-site latency, disconnected remote site and quorum considerations
• Forwarding Secondary synchronises with forwarded secondaries.
server1
Cluster 1, Availability Group X
server2 server3
server4
Server5
Cluster 2, Availability Group Y
Async replication streamFP
S S S
53m
Copyright © 2015, SQLCloud Limited. Please do not redistribute, republish in whole or in part without prior permission of content owner. www.sqlcloud.co.uk
Other new features
• MSDTC Support in Availability Groups
• Database level failover• (but see https://connect.microsoft.com/SQLServer/feedback/details/2051070)
• Log shipping transport improvements
• Azure Replica Wizard
• Group Managed Service Accounts (gMSA)
• 3 synchronous replicas (3 auto failover targets)
• Cluster Operating System Rolling Upgrade
• Storage Replica
• File Snapshot Backup
Copyright © 2015, SQLCloud Limited. Please do not redistribute, republish in whole or in part without prior permission of content owner. www.sqlcloud.co.uk
Thank you for listening!
Email: [email protected]
Twitter: retracement
Blog: http://tenbulls.co.uk