data stream customer_deck_dec_2011
TRANSCRIPT
Citrix Confidential - Do Not Distribute
Student Guide - Official Training - Confidential Documents - Internal Training
Cisco - Citrix - Oracle - VMware - Microsoft - IBM - HP - NetApp
vspheredatabaseunified.wordpress.com or http://ouo.io/8u1RP
Data Explosion
Scaling Database Architectures
Scale Up Scale Out
Performance • Replace existing SMP server with bigger SMP server to add capacity
• Add capacity on demand with commodity servers
HA/Failover • HA cluster • DB proxy or middleware• TCP load balancers
System Cost • 12 CPU SMP server can cost over $500K • 24 commodity servers cost ~$100K
Database Scaling Issues
Performance Scalability
• Lack of solutions to scale database performance cost effectively
• Connection capacity does not scale linearly for MS SQL Server
• Applications are getting more complex and data dependent
• Non-optimal utilization of database server resources
• No SQL-intelligent load balancing; TCP-based load balancing
• Lack of deep application-level health checks
• Complex scripts results in downtime and operational expenditures when database clients or servers are added/removed
Existing Solutions to Scale Databases
Function Deficiencies
Database Proxy • Low-level load balancer • Not available for MS SQL • Open-source solution – not
actively maintained• Limited load balancing
algorithms and health checks
Middleware • Customized solution to distribute DB transactions
• Expensive custom solution• Requires customer
maintenance
TCP Load Balancer • Distributes DB transactions at a connection level, not a query level
• No query-level load balancing, content switching, health checks or SQL connection multiplexing
Internet
Web/App Tier
NetScaler DataStream in Database Tier
High AvailabilityScalability
App SecurityHigh Performance
HTTP ADCTCP Load Balancer
High ValueLimited Value
HTTPNative SQL
Simple HASimple LB
Microsoft SQL Server
DB Tier
TCP
Conn MultiplexingContent SwitchingHigh Availability
NetScaler ADC
Improved Availability
Optimal Scale-Out
Connection Scale-Up
NetScaler DataStreamTM
TDS Protocol aware
Scale Up Scale Out High-Availability
NetScaler DataStreamTM Benefits
SQL Multiplexing Scale TCP connections Host more DBs on server Reduce SQL hardware
SQL Conn. Offload Frees memory/cpu resources Faster query execution
Native SQL LB Request switching Fast app response
SQL Aware Policies Read/write split DB sharding Granular control
Automated IP Failover Virtual IP based Lower cost HA
Intelligent Monitoring Replication state aware
NetScaler provides ScaleUp like performance for ScaleOut like economics
A
Z
D
Y
Load Balancer
BC
E F
A,B,C….Y,Z -> SQL Queries
DB Tier
Microsoft SQL Server
Scale-Up Master DB Active/Passive
Scale-OutRead-Only DB
TCP Load Balancer
L7 Based load balancing mechanism
Z
D E F
Y
NetScaler
A,B,C….Y,Z -> SQL Queries
SQL Connection Multiplexing/Content Switching
DB Tier
Microsoft SQL Server
Scale-Up Master DB Active/Passive
Scale-OutRead-Only DB
A CB
DB Tier
Microsoft SQL Server
Scale-Up Master DB Active/Passive
Scale-OutRead-Only DB
Intelligent Health Monitoring - HA
B
Z
E
Y
NetScaler
Server unresponsive for 20 minutes – SQL Query A , Replication is being deferred also
Monitor Subscription pending commands and switch SQL Requests
Server back online
A C
FD
DB Tier
Microsoft SQL Server
Master DB Active/Passive
Database Failover/HA
NetScaler
Server goes Offline without completion of “A” & “D”
NetScaler sends Resets for Active connections.Idle Connections are untouched.NS Opens New connection to backup Vserver.
Server back online No switch back with “Disable Primary Vserver On Down”
A
D
Connection Reset
Citrix Confidential - Do Not Distribute
Performance validation with BreakingPointTransactions per Second
Traffic Profile: TPS_1
MPX Direct With NS
Transactions/sec 5,250 14,700
Queries/sec 21,000 58,800
Queries/minute 1,260,000 3,528,000
Latency of each transaction (ms) 34 13
PE CPU use % N/A 46
SQL server CPU use % 100 100
SQL server RAM use (MB) 131 123
RX tput (Mbps) 80/75 205/160
Client connections/ Server connections 1 1
ConfigurationMS SQL Server 2008 on 4-cores + 4GB RAM Server/Windows 2003 32 bit, Intel Xeon X5680 3.33 GHzTopology: 1 arm modeSwitch: Cisco 3750Traffic Profile TPS_1: user logins, issues 5 queries and log off. (logins + set database to AdventureWorks2008R2, then 4 read queries, and finally sends a FIN to terminate the connection.
3x Improvement
Citrix Confidential - Do Not Distribute
Performance validation with BreakingPointLatency
ConfigurationMS SQL Server 2008 on 4-cores + 4GB RAM Server/Windows 2003 32 bit, Intel Xeon X5680 3.33 GHzTopology: 1 arm modeSwitch: Cisco 3750Traffic Profile TPS_2: user logins, issues 2 queries and log off. (logins + set database to AdventureWorks2008R2, then 1 read query, and finally sends a FIN to terminate the connection.The read query retrieves the last row of table "Sales.SalesReason" in AdventureWorks2008R4 database.
Traffic Profile: TPS_2
MPX Direct With NS
Transactions/sec 7,100 36,000
Queries/sec 7,100 36,000
Queries/minute 426,000 2,160,000
Latency of each transaction (ms) 26 1.3
PE CPU use % N/A 65
SQL server CPU use % 100 95
SQL server RAM use (MB) 128 113
RX tput (Mbps) 60 200
Client connections/ Server connections 1 1
20x Reduction
DB Scale-UP with NetScaler
Web/App Servers
PassiveActive
Master Database HA Setup
NetScaler
• Connection Multiplexing reduces load• Application points to Netscaler VIP• Monitor DB servers with custom monitors • Deploy more DBs on the same server• Increase Availability and Reliability
Scale-Up: Microsoft SQL Server Use CaseCurrent State
1000 application servers connecting to 8 databases on each SQL server causing TCP connection explosion and increasing HP server hardware requirements without optimal CPU use. Need to add more applications while keeping the SQL server count at 400.
Requirement
Scale SQL server connection capacity and reduce HP server count while keeping application latency low and increasing CPU usage.
NetScaler Solution
SQL server connection management offloads servers and reduces overall cost with 50:1 client to server connection ratio.
Content DB Scaling-Out use case 99% Reads 1% Writes
• Load balance Read-only DB Servers/Snapshots• Application points to Netscaler DB VIP• Monitor DB servers with custom monitors • Add more Read-only servers to improve performance• Avoid Servers that are being updated• Reduce SQL Server infrastructure cost
Online Transaction Processing (OLTP) App Servers
MirrorPrincipal
Content Master
SQL Server SQL Server
Log Data Log Data
Asynchronous Mirror
Peer Replication
Netscaler
Scale-Out OLTP :MySQL/MS SQLCurrent State
Distribute application load to 50+ Read only servers in each peer-replicated setup.Application servers statically mapped to SQL servers via custom scripts
- Unmanageable server sprawl - TCP LB implementations fail due to lack of SQL connection management
Requirement
Load balance SQL queries to ‘Read-Only’ servers and reduce TCP connection overheadof setup/tear-down on each SQL transaction.
NetScaler Solution
Intelligent SQL-aware switching achieves optimal Scale out and TCP/SQL connection management reduces client server connection ratio by 10:1 or more.
Sharding userid modulo Scaling-Out use case
• Application points to Netscaler DB VIP• Monitor DB servers with custom monitors • Shard read/write intensive tables• Minimal changes to application • Scale linearly
Online Transaction Processing (OLTP) App Servers
Netscaler$userid = 3
$userid
%3 = 0 Shard 0
Shard 1
Shard 2
DB Read/Write Split + HA with NetScaler
App Servers
Web Servers
PassiveActive
Master Database HA Setup
Read Only Slave Databases
NetScaler
• Load balance Read-only DB servers• Application points to Netscaler VIP• Graceful Shutdown • Disable Primary Vserver on Down• Replication aware custom monitors • Read/Write Split on NetScaler• Increase Availability and Reliability
Writes
Reads - re
altime
High-Availability: MySQL/MS SQL
Current State
Distribute application load to 35 Read only servers in each peer-replicated setup.Application servers statically mapped to SQL servers via custom scripts
- Master DB Failover requires manual intervention. - TCP LB implementations fail due to lack of custom SQL server monitors.
Requirement
Replication-aware SQL health monitors for HA and scale-out
NetScaler Solution
SQL LB with intelligent, replication-aware health monitors and automated, virtual IP-based IP failover with graceful shutdown and disabling the primary vserver
TCP LB vs Custom Scripts vs NetScaler SQL LB
Feature/Benefit TCP LB Custom
Scripts
DataStreamTM
SQL LB
Scale-up TCP connections
SQL connection offload
Native SQL LB
Scale out read-only servers
High Availability
Intelligent monitors
SQL content SwitchingRead/Write split & Sharding
5-Nines DB HA Solution
DC-2 DC-1
DB Tier
Web Servers
Service Broker - Async Updates
Microsoft SQL Server
Two Mirrored SQL servers Two Mirrored SQL servers
Web Servers
GSLB at each site (DC)
WitnessWitness