Вы находитесь на странице: 1из 24

AlwaysOn:

Availability
Groups
MODIFY THIS SLIDE FOR ACTUAL PRESENTER, DELETE THIS BAR
AFTER MODIFICATION

dandyw@microsoft.com ILIKESQL.COM

Dandy
Weyn @ilikesql
SQL SERVER DELIVERS
REQUIRED
GREATER
9S
Maximize uptime for mission critical
UPTIME AlwaysOn High Availability
applications Windows Server Core Support
Online Operations Enhancements

IMPROVED
Integrated Configuration Wizard
PRODUCTIVITY
Windows PowerShell Support
AlwaysOn Dashboard
Microsoft System Center Monitoring

GREATER HARDWARE
UTILIZATION Active Secondaries
Scale Read-Only Applications
Offload Backups
Fast Application Failover
GREATER UPTIME WITH HIGH
AVAILABILITY
Key technologies to deliver required 9s
ONLINE
ALWAYSON WINDOWS SERVER
OPERATIONS
CORE SUPPORT
ENHANCEMENTS
Availability Groups Reduce OS patching Maintain uptime
provide database level by as much as 50- during
protection 60% with new support maintenance
for Windows Server operations using
Multiple
Core1 enhanced online
Secondaries
operations
Reduce planned
Failover Cluster
downtime by Reindexing of large
Instances provide
reducing OS patching object data types
instance level
protection Adding non-null
columns
1
The percentage reduction in patching varies & can be less based on the server roles that are enabled & the type of patches that
are applied.
SQL SERVER 2012 HA & DR
SOLUTIONS
Shared Storage solution
Multi-site Failover Instance Level HA
1 Cluster Instance (FCI) Instance Level DR
for HA & DR Doesnt require database to be in FULL
recovery model
Non-Shared Storage solution
(Group of) Database Level HA
Availability Group (Group of) Database Level DR
2 for HA & DR DR replica can be Active Secondary
Requires database to be in FULL recovery
model
Combined Shared Storage and Non-Shared
Failover Cluster Storage
Instance Level HA
Instance for local HA &
3 Availability Group for (Group of) Database Level DR
DR replica can be Active Secondary
DR Requires database to be in FULL recovery
model
ALWAYSON AVAILABILITY
GROUPS
AlwaysOn Availability Groups is a new feature that enhances
and combines database mirroring and log shipping capabilities
Flexible Integrated Efficient
Multi-database failover Application failover Active Secondary
Multiple secondaries using virtual name Readable Secondary
Total of 4 secondaries Configuration Wizard Backup from
2 synchronous Secondary
secondaries Dashboard
Improves primary
1 automatic failover pair
System Center server performance by
Synchronous and Integration offloading work to
asynchronous data secondary
movement Rich diagnostic
infrastructure Monitoring and
Built in compression and
Troubleshooting
encryption File-stream replication
enhanced
Auto-page repair Replication publisher
Automation using
Automatic and manual failover
PowerShell
failover (new design)
Flexible failover policy
ALWAYSON AVAILABILITY GROUP
LISTENER
Availability Groups Listener allow applications to failover
seamlessly to any secondary; reconnecting through Virtual
Network Name
ServerA ServerB ServerC
2 2
2 D
DB D
B B
TechAG1
TechListener
TechListener
1
1

Primary Primary
Secondary Secondary
Application retry during failover

Connect to new primary once


Parameter Sample: failover is complete
-server
TechListener1;- and the listener is online
catalog HRDB
ALWAYSON AVAILABILITY GROUP
ARCHITECTURE
Windows Server Failover Clustering
(WSFC)

Database Database
Active Log Active Log
Synchronization Synchronization

Availability Group uses WSFC is a Common Microsoft Availability Platfor


WSFC for
Inter-node health SQL Server AlwaysOn Failover
detection Cluster Instances
Failover coordination SQL Server AlwaysOn Availability
Group
Primary health detection
Microsoft Hyper-V
Distributed data store for
settings and state Microsoft Exchange
Distributed change Built-in WSFC workloads (e.g. file
notifications share, NLB, etc.) and third party
workloads
NEW TOPOLOGY BENEFITS
Easier Deployment &
Better SLAs
Management
Multiple no data loss secondaries Unified solution
Better data loss protection for DR Simple deployment
secondaries through continuous
replication Unified dashboard

Faster failover to DR secondaries Rich diagnostics


through virtual name failover Centralized management of client
connection topology
Multi-DB failover

New Management Dashboard


ALWAYSON ACTIVE
SECONDARIES
AlwaysOn Active Secondary enables efficient utilization of
high availability hardware resources to improve overall IT efficiency

IT EFFICIENCY AND COST-


EFFECTIVENESS ARE CRITICAL
FOR BUSINESSES
Idle hardware is no longer an
option.

ACTIVE SECONDARY USES


Read-only workloads
Offloading Backups
ACTIVE SECONDARY READABLE
SECONDARY
SQLservr.exe SQLservr.exe

Secondary
Primary Secondary
Primary

InstanceA
CRASH InstanceB
Database Log
Synchronization

DB1 DB2 DB1 DB2

Reports Reports

Readable secondary allow offloading read queries to secondary


Low data latency
After failover, the read applications can be automatically redirected to the new
Secondary (require explicit connection request)
Not a replacement for replication scenarios
READABLE SECONDARY DATA LATENCY

Primary Secondary

Log
Log
Capture
Networ Log
Capture Receive
DB1 k DB1

Log Pool Redo


Commit
Thread

Log Log Redo


Cache Cache Pages

Log Flush Log Hardened

Acknowledge
DB1 Log DB1 Data DB1 Log DB1 Data
Commit

Secondary read is always behind primary during


transaction activity
READ WORKLOAD IMPACT
CONCURRENCY AND BLOCKING
REDO can get blocked by reporting
workload
REDO thread and read workload can Read/Write Read
deadlock

SOLUTION
Internally map read workload to non
blocking isolation levels (no application
changes required) PRIMARY SECONDARIE
Read Uncommitted Snapshot Isolation S
Read Committed Snapshot Isolation
Repeatable Read Snapshot Isolation
Serializable Snapshot Isolation
Ignore all locking hints
RESULT
Never choose REDO as deadlock victim
Blocking and deadlock between Reporting workload (i.e. Query) and
REDO thread is eliminated
No issues with DML (INSERT/DELETE/UPDATE) as it is not allowed
Will incur additional cost of row versioning.
CLIENT CONNECTIVITY
READ / WRITE WORKLOAD
Connecting using AG Listener
Connection using FAILOVER_PARTNER (if
connection string of existing applications
cant be changed) CLIENT

READ ONLY WORKLOAD


AG Listener
Connection using VNN and
ApplicationIntent=ReadOnly
Connection to the secondary instance
directly
ReadOnly Routing

MULTI SUBNET FAILOVER


SECONDARIE
SCENARIO: PRIMARY
S
New client libraries =>
MultiSubnetFailover=True
Old client libraries configure appropriate
client connection timeout
BACKUP CAPABILITIES
Backups from RECOVERY ADVISOR
any replica
Synchronous or
asynchronous
secondaries
Primary backups still
work

Adds capacity to
primary server by off-
loading backups to a
replica
Log backups done
on all replicas
form
a single log chain
Recovery Advisor
makes restores simple
CONSIDERATIONS FOR AVAILABILITY GROUPS

All SQL servers (including the secondary in


the DR site) in the same Windows domain
One Windows Server Failover Cluster spreads
over the primary and DR sites New Tools for
All the databases must be in FULL recovery Monitoring &
model Alerting
AlwaysOn Dashboard
The unit of failover (for local HA, as well as
DR) is at the AG level, i.e., group of System Center
databases not the instance Operations Manager
Consider using Contained Database for
containing logins for failover
For jobs and other objects outside the
database, simple customization needed

No delayed apply on the secondary like log


shipping
Removing log shipping means the regular log
backup job is removed
Need to re-establish periodic log backup
Failover
Clustering
Improvement
s
DEMO
ALWAYSON MULTI-SITE FAILOVER CLUSTER
INSTANCE
HA & DR Solution
Provide High Availability at the Instance Level
Unit of failover = SQL server instance
Maintain same virtual network name after failover. Clients re-connect to same
name
Instance restart requires database to go through recovery

Provide Disaster Recovery at the Instance Level


Provide Disaster Recovery protection from site failure: be it network, power,
infrastructure or other site disasters.
Require storage based replication technology and networking considerations
Multi-subnet support:
Native
Version Implementation
Support
SQL Server 2008 Create stretch Virtual-LAN (VLAN) to act as a
NO single subnet
R2
IP address OR dependency support within
SQL Server setup
SQL Server 2012 YES
SQL Engine skips binding to IPs not online on
start-up
MULTI-SUBNET CLUSTERING
Corpnet
Network Name: SqlClust

IP1: 10.168.0.10
OR IP2: 192.168.0.10

subnet 1 subnet 2
Node1 Node3
Node2 Node4

Local Site SAN Replication Remote Site


TEMPDB ON LOCAL DISK

WHY WE ENABLE THIS?


LOCAL TEMP LOCAL TEMP
tempdb access occupies large % DB DB
of SAN I/O (Fast disk, SSD) (Fast disk, SSD)
Fast local HDD/SSD becomes
standard Server configuration

BENEFITS
Better overall performance
Cost saving SECONDARIES
PRIMARY

IMPORTANT NOTE!
Ensure that tempdb local paths
are available to SQL Service on Shared Disk
all the nodes (SAN)
ALWAYSON FAILOVER CLUSTER
INSTANCE
Flexible Failover Policy provides administrators control over the
Failover Condition Policy
conditions when an automatic failover should be initiated.

SQL Server 2008 R2 SQL Server 2012

Resourc Resourc
e DLL e DLL

Select @@servername
sp_server_diagnostics

SQL
SQL Diagno
Diagno Server
Server stics
stics

Configurable options eliminate false


failover
Improved logging for better diagnostics
SQL Server Hands-on-
Labs

SQLSERV
ERLAUNC
H
.COM

Вам также может понравиться