10.07.2015 Views

POWER SOLUTIONS

POWER SOLUTIONS

POWER SOLUTIONS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

DATABASE TECHNOLOGYThe MSN CSP application uses SQL Server transactional replicationto help ensure high availability because transactional replicationenables a combination of low latency and transactionalconsistency guarantees. The CSP application is not designed toread or write to both the primary and the secondary databasesconcurrently for two reasons:• Application design would be much more complex. It wouldbe necessary to implement bidirectional replication betweenprimary and secondary databases.• The secondary copies coexist with primary copies of differentdata set partitions on the same nodes. Reading from thesecondary database would take resources from those primarydatabases.Transactional replication uses the transaction log to captureincremental changes that were made to data in a publishedtable. Microsoft SQL Server monitors INSERT, UPDATE,and DELETE statements, or other modifications made tothe data, and stores those changes in the distribution database,which is designed to act as a reliable queue. Changesare then propagated to subscribers and applied in the sameorder as they occurred by opening a connection to the subscriberdatabase and issuing SQL commands to the subscriberdatabase. In applications where there are high write-to-readtransaction ratios, replication may lag behind the transactionprocessing. The common limiting factors are network latency,index overhead on the subscriber database, and the number ofconnections to the subscriber that is executing the commands.When the source system’s transactions per second exceed thereplication capacity of the subscriber’s system, replication latencywill keep climbing until the transaction load is reduced. Losingthe primary system causes transactions to be lost in the replicationqueue. The tolerable level of transaction loss depends onbusiness needs and the desired end-user experience.There are several ways to avoid the replication bottleneck:• The data and workload should be spread out acrossmore physical servers, which reduces the workload perdistributor—although this approach can lead to underutilizedhardware. This is the option elected for the CSPapplication.• Since each server running SQL Server has only one distributor,having multiple SQL Server instances providesmultiple distributors per server. By spreading the originalworkload across these instances, the replication load canbe processed by more distributors per server. In this way,additional servers are not needed but additional managementis required for allocating hardware resources amonginstances, such as CPU and memory.• Microsoft SQL Server 2005 is designed to support parallelreplication and to help ensure that transactions are processedto the subscriber in the same order as to the publisher. Atpress time, SQL Server 2005 had not been released so thisfeature was not yet implemented on the CSP production site.On an ongoing basis, the MSN CSP application developmentteam runs a stress test lab at Microsoft to determine the stress-levelthreshold where replication queue build-up exceeds specified designlevels. In live production, the MSN CSP operation team monitors thestress level of client requests per node. As the number of accountsand size of the accounts increase, so does the number of queriesper node. When the stress level reaches the threshold, the CSP teamadds another failover group to the system.System failure detection and failoverThe MSN scale-out management layer monitors the status of allnodes. It detects the failure of a server or a database and promotesthe secondary database for the failed partition by redirecting theworkload traffic to the secondary database.BeforeWorkloadAfterWorkloadPartition 1(Primary)Partition 2(Primary)Partition 1(Primary)Partition 2(Primary)Partition 3(Primary)Partition 4(Primary)Partition 2(Secondary)Partition 1(Secondary)Partition 2(Secondary)Partition 1(Secondary)Partition 4(Secondary)Partition 3(Secondary)Database server 1Database server 2Database server 1Database server 2Database server 3Database server 4Figure 5. Adding a failover group102DELL <strong>POWER</strong> <strong>SOLUTIONS</strong> Reprinted from Dell Power Solutions, August 2005. Copyright © 2005 Dell Inc. All rights reserved. August 2005

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!