+ All Categories
Home > Documents > MySQL Whitepaper Guide to DB High Availability

MySQL Whitepaper Guide to DB High Availability

Date post: 10-Apr-2018
Category:
Upload: mahyuddin-husairi
View: 224 times
Download: 0 times
Share this document with a friend
20
 A Guide to Database High Availability An Introduction to Database High Availability Concepts and Requirements A MySQL  ® Business White Paper August 2006 Copyright © 2006, MySQL AB
Transcript

8/8/2019 MySQL Whitepaper Guide to DB High Availability

http://slidepdf.com/reader/full/mysql-whitepaper-guide-to-db-high-availability 1/20

A Guide to Database High Availability

An Introduction to Database High AvailabilityConcepts and Requirements

A MySQL ®

Business White Paper August 2006

Copyright © 2006, MySQL AB

8/8/2019 MySQL Whitepaper Guide to DB High Availability

http://slidepdf.com/reader/full/mysql-whitepaper-guide-to-db-high-availability 2/20

Table of Contents

1 Introduction...........................................................................................................................4

2 Benefits of High Availability ................................................................................................4

2.1 Businesses and Applications ...........................................................................................................................4 2.2 Causes of Downtime........................................................................................................................................5 2.3 Special Requirements for the Telecommunications Industry ..........................................................................5

3 Understanding High Availability Terms and Concepts .....................................................6

3.1 High Availability................................................................................................................................................6 3.2 Continuous Availability.....................................................................................................................................6 3.3 Measuring “Availability”....................................................................................................................................6 3.4 Five Nines (99.999% Uptime)..........................................................................................................................7

3.5

Fault Tolerance ................................................................................................................................................8

3.6 Single Point of Failure......................................................................................................................................9 3.7 Fail Over...........................................................................................................................................................9

4 Replication ............................................................................................................................9

4.1 File-Based Replication .....................................................................................................................................9 4.2 Database Replication.......................................................................................................................................9

5 Clustering............................................................................................................................10

5.1 Service Clusters.............................................................................................................................................10 5.2 Load Balancing Clusters ................................................................................................................................10 5.3 Database Clusters .........................................................................................................................................10

5.3.1 Shared-Disk Database Clusters............................................................................................................10 5.3.2 Shared-Nothing Database Clusters ......................................................................................................11

6 High Availability Requirements and Considerations.......................................................11

6.1 Budgets & Timeliness to Delivery ..................................................................................................................11 6.2 Service Level Agreements .............................................................................................................................12 6.3 Fail Over Requirements .................................................................................................................................12 6.4 Open Source, Proprietary and Mixed Technology Stacks.............................................................................12 6.5 Security Considerations .................................................................................................................................13 6.6 Hardware Requirements ................................................................................................................................13 6.7 Storage Considerations .................................................................................................................................13

6.7.1 RAID......................................................................................................................................................14 6.7.2 Shared Area Networks (SAN) ...............................................................................................................15 6.7.3 Network Attached Storage ....................................................................................................................15

6.8 Operating System Interoperability .................................................................................................................15 6.9 Geographic Redundancy ...............................................................................................................................16

7 Why MySQL?.......................................................................................................................16

7.1 Scalability and Flexibility ................................................................................................................................16 7.2 High Performance ..........................................................................................................................................16 7.3 High Availability..............................................................................................................................................16

Copyright © 2006, MySQL AB Page 2 of 20

8/8/2019 MySQL Whitepaper Guide to DB High Availability

http://slidepdf.com/reader/full/mysql-whitepaper-guide-to-db-high-availability 3/20

7.4 Robust Transactional Support .......................................................................................................................16 7.5 Web and Data Warehouse Strengths ............................................................................................................16 7.6 Strong Data Protection...................................................................................................................................17 7.7 Comprehensive Application Development.....................................................................................................17 7.8 Management Ease.........................................................................................................................................17 7.9 Open Source Freedom and 24 x 7 Support...................................................................................................17 7.10 Lowest Total Cost of Ownership................................................................................................................17

8 Conclusion ..........................................................................................................................18

9 About MySQL......................................................................................................................18

10 Resources.......................................................................................................................19

10.1 White Papers .............................................................................................................................................19 10.2 Case Studies .............................................................................................................................................19 10.3 Press Releases, News and Events ...........................................................................................................19 10.4 Live Webinars............................................................................................................................................19 10.5 Webinars on Demand................................................................................................................................20

Copyright © 2006, MySQL AB Page 3 of 20

8/8/2019 MySQL Whitepaper Guide to DB High Availability

http://slidepdf.com/reader/full/mysql-whitepaper-guide-to-db-high-availability 4/20

1 Introduction

In today’s business world, information and the access to it, forms not only the infrastructure, but often theentire revenue model for some organizations. Therefore, maintaining the availability and access to this

information has become increasingly more important and common place for businesses big and small.High availability has traditionally been the domain of mission and business critical systems such as,applications, databases and storage networks. However, less critical systems are beginning to takeadvantage of the many low-cost, high availability solutions currently available on the market.

The demands placed on these information systems include not only ensuring the availability of importantdata, but also the efficient sharing of resources and the existing computing infrastructure. A highavailability solution should deliver the greatest amount of data and application availability across thediverse technology stacks currently found in many modern enterprises. These technology stacks includevarious operating systems, applications, hardware components, and can often span multiple geographiclocations. More often then not, it is a database that sits behind many of these critical applications andinformation assets. In this paper of the high availability white paper series, we introduce high availabilityand the concepts around the subject. We also explore some consideration when selecting a high

availability database solution. In “A Guide to MySQL High Availability Solutions”, we examine in greaterdetail, the high availability solutions provided by MySQL, including MySQL Replication and MySQLCluster. We also include an introduction to MySQL Professional Services and the MySQL network ofcertified partners and products.

2 Benefits of High Availability

Before we get started helping you determine the high availability needs of your organization and exploringthe corresponding solutions offered by MySQL and its partners, it would be best to start with an overviewof the types of businesses and applications that would benefit from the implementation of a highavailability database solution.

2.1 Businesses and ApplicationsHigh availability solutions from MySQL and its certified partners should appeal to organizations interestedin making their applications more highly available, and in some cases, available to the point where theyapproach mainframe reliability. This is best achieved by leveraging cost-effective, commodity hardwareand software. These companies and applications include, but are not limited to:

• Telecommunications• Web 2.0• eCommerce• High-volume websites• Any company interested in increasing the availability of their existing MySQL-based applications

It is no secret that “data” has become the most important, and valuable component of almost everymodern application. It is precisely what is driving some of the most revolutionary developments wecurrently see in computing and the internet. This is especially apparent in companies deploying Web 2.0applications and technologies. This is being done in an effort to realize new opportunities for generatingrevenue and to make more efficient use of their current business processes and infrastructure.

Arguably, data and transactional states are the hardest part of an application to make highly available.Implementing a database that is highly available makes it easier for the application that depends on thedatabase, to become highly available as well. This permits pushing the complexity of data management

Copyright © 2006, MySQL AB Page 4 of 20

8/8/2019 MySQL Whitepaper Guide to DB High Availability

http://slidepdf.com/reader/full/mysql-whitepaper-guide-to-db-high-availability 5/20

and transactional states to the database layer. The clear advantage of this arrangement is that thedatabase will almost always be more competent, efficient and accurate in handling these duties then anyother component within the system.

2.2 Causes of Downtime

Besides the obvious cost to a business’s bottom line, downtime can significantly impact the availability ofthe system as a whole. The consequences of a system’s unavailability can vary anywhere from aninconvenience, to a loss in productivity, to the actual endangerment of property and life. Unplanneddowntime occurs as a result of a hardware or software failure. Because administrators can not predictwhen unplanned downtime will occur, users cannot be notified and accommodate accordingly for suchoutages. Planned downtime occurs when an administrator makes some components or the entire systemunavailable to users and processes at a scheduled time. During these scheduled downtimes,administrators will perform maintenance operations and repair activities to the system, so as to have theleast effect on users and business productivity.

To remove or minimize downtime, some type of clustering is usually implemented. Ideally, a clusteringsolution should permit the performing of maintenance operations on a component, while the rest of thesystem continues to remain available and service requests. Below in Figure 1 is a table listing the

common causes of downtime and some examples for each.

Power loss, fire, water damage, earthquake or other natural orunnatural disaster resulting in downtime.Physical Disaster

Upgrades, patches and hot fixes for hardware, firmware, drivers,operating system/applications, any activity requiring a system rebootPlanned Administration & Maintenance

Accidental or intentional file deletion, untrained operation,experimentation, viruses or other malicious codeOperator Error or Malicious Users/Code

Crashing or data corruption due to faulty operating system, databaseor other softwareSoftware Bug or Crash

Memory, fans, motherboards, power supplies, disk drives, diskcontrollers, routers or cablingComponent Failure

ExamplesCause of Downtime

Power loss, fire, water damage, earthquake or other natural orunnatural disaster resulting in downtime.Physical Disaster

Upgrades, patches and hot fixes for hardware, firmware, drivers,operating system/applications, any activity requiring a system rebootPlanned Administration & Maintenance

Accidental or intentional file deletion, untrained operation,experimentation, viruses or other malicious codeOperator Error or Malicious Users/Code

Crashing or data corruption due to faulty operating system, databaseor other softwareSoftware Bug or Crash

Memory, fans, motherboards, power supplies, disk drives, diskcontrollers, routers or cablingComponent Failure

ExamplesCause of Downtime

Figure 1

2.3 Special Requirements for the Telecommunications Industry

As a result of intense competition and dynamic market conditions, voice & data communicationsorganizations, as well as, cable TV providers, are being forced to rapidly deliver new value-added contentand services, operate more efficiently, and increase customer satisfaction. For many communicationscompanies, open source software has played a key role in application development. This has allowed

Copyright © 2006, MySQL AB Page 5 of 20

8/8/2019 MySQL Whitepaper Guide to DB High Availability

http://slidepdf.com/reader/full/mysql-whitepaper-guide-to-db-high-availability 6/20

them to build custom applications that are highly reliable and still fall within the constraints of their everdecreasing budgets. A critical concern that is woven into many of these applications, is the need for themto be highly available. The applications and services the telecommunications industry develops andmaintains, comprise much of the infrastructure for other industries. Therefore the requirements aroundavailability in the telecommunications industry are some of the highest found anywhere.

3 Understanding High Availability Terms and ConceptsAt this point it is best to explore and define a few key terms and concepts central to any discussionconcerning database high availability.

3.1 High Availability

According to the Institute of Electrical and Electronics Engineers (IEEE), High availability (HA) refers to theavailability of resources in a computer system, in the wake of component failures within the system. Thiscan be achieved leveraging a variety of strategies. They may range from solutions that utilize customizedand redundant hardware, to software solutions using commercial off-the-shelf (COTS) hardwarecomponents. Customized solutions typically provide a higher degree of availability, but are significantly

more expensive to deploy and maintain. This fact has led to the growth of software solutions whichleverage COTS hardware. The solutions presented in this paper will focus on achieving MySQL highavailability using the latter strategy.

3.2 Continuous Availability

Another term often used in discussions concerning high availability, is “continuous availability”. As theterm implies, this level of availability is characterized by continuous non-stop service. This level ofavailability is assumed to prevail even in the middle of a component fail over. Solutions of this type mustalso be able to handle the integrity of partially completed transactions or operations. This means anyactivated components assisting in a recovery are able to complete any of the work interrupted by theinitial failure.

Although continuous availability represents an ideal and worthwhile goal, the very small quantity ofdowntime that would be accepted in this scenario, is rarely required. Only the most critical applicationstypically found in the military, defense, telecommunications or financial industries, have such a highstandard for availability.

It is very important to note, that high availability does not mean continuous availability. It should also benoted however, that very high levels of availability, even those approaching non-stop service, can beachieved. Often this is done by leveraging some of MySQL’s high availability solutions, without theburden of any additional expense and/or complexity.

3.3 Measuring “Availability”

“Availability” is the measure of a system’s ability to continue to make its resources accessible or provideservices. As mentioned previously, although seeking to obtain the maximum possible uptime is an idealgoal, it can often be tempered by compatibility, budgetary, time and/or on-going maintenance constraints.

At this point, it does merit drawing a distinction between the terms, “reliability” and “availability”. Reliabilityis typically used when referring to the number of faults a system experiences within a given time interval,while availability is a measure of the system’s overall ability to offer resources and services despite anyfaults.

Copyright © 2006, MySQL AB Page 6 of 20

8/8/2019 MySQL Whitepaper Guide to DB High Availability

http://slidepdf.com/reader/full/mysql-whitepaper-guide-to-db-high-availability 7/20

There are two standard metrics used within computing to measure the availability of a system. They aremean-time-between failure (MTBF) and mean-time-to-recovery (MMTR).

MTBF is the average time between failures. Calculations making use of the MTBF assume that a system isrepaired, replaced or patched, after each failure. It is also assumed that the component is then returned toservice immediately after the failure.

MTTR is the average time a device takes to recover from a failure. This may include individual componentsor entire systems. The MTTR is typically included as part of a maintenance contract, where the user willfrequently pay more for a system whose MTTR is 24 hours, over one that is 3 days. This does not dictatethat the supplier of the component or system must guarantee the return to an up and running state within24 hours of being alerted to the failure. It does mean the average amount of time required to get thecomponent or system back online will likely be 24 hours. In other words, it is a measure of the total timespent performing all the needed repairs, patching and/or replacements, divided by the number of requiredrepairs within the given time interval.

3.4 Five Nines (99.999% Uptime)

A popular marketing message that has been very visible across the computing industry the last few years

is the concept of a piece of software or hardware having the ability to deliver “Five Nines” of uptime. Inregards to the subject matter of this paper, we should treat “Five Nines” not as a hard metric, but rather aterm that helps us better understand the concept of high availability. “Five Nines” equals 99.999 percentuptime for the component or system. Obtaining 100% uptime is often an expensive, futile, or impossibletask. However, all organizations should determine and seek what degree of “Five Nines” availability isright for them. In reality, achieving “Five Nines” means allowing roughly only five minutes of downtime foran entire calendar year. “Three Nines” of availability is a much more practical percentage to aim for.“Three Nines” of availability translates into about nine hours of allowable downtime per year. If this levelof availability can be achieved, then the component or system could easily be considered a highlyavailable component or system for just about any production environment. Figure 2 illustrates theapproximate amount of downtime that would be acceptable using this type of measurement.

3.65 days99%

5.26 minutes99.999%

52.56 minutes99.99%

8.76 hours99.9%

Acceptable

DowntimeUptime Percentage

3.65 days99%

5.26 minutes99.999%

52.56 minutes99.99%

8.76 hours99.9%

Acceptable

DowntimeUptime Percentage

Figure 2

As mentioned previously, the real value of the “Five Nines” metric is found in the manner in which it helpsput the concepts of availability and reliability in terms that are easier to understand and visualize. Below inFigure 3 we illustrate the general needs of various industries and the applications we may find therein.We also plot several categories of high availability solutions that would likely need to be employed inorder to overcome the scenarios which may cause a component or system to become unavailable.

Copyright © 2006, MySQL AB Page 7 of 20

8/8/2019 MySQL Whitepaper Guide to DB High Availability

http://slidepdf.com/reader/full/mysql-whitepaper-guide-to-db-high-availability 8/20

9 9. 9 999 9. 9 99

35 days 4 days 50 m ins 5 m ins8 hours35 days 4 days 50 m ins 5 m ins8 hours

Unmanaged

ReplicationTechnologies

ClusteringTechnologies

Clustering &GeographicalRedundancy

software upgrades

hardware upgrades

maintenance operations

software failures

network failures

power failures

disasters

Well-Managed

hardware failures

SmallBusiness

ISPs &Mainstream

Business

DataCenters

BankingMedical

TelcoMilitaryDefense

Five Nines o f Ava i lab i l i t y

%

Figure 3

It does bear to acknowledge that the concept of “Five Nines” does lend itself to potentially drawing somefalse conclusions about a component or systems uptime characteristics. For example, we can measurethe availability of a component as the total amount of time it was online, and its reliability as the number oftimes it went offline. In such a scenario, we can have a single outage of considerable duration within ayear, and the component could be labeled as having high reliability, but low availability. Or we could havemany outages of several seconds or less, and the component in turn, could be described as being highlyavailable, but very unreliable.

3.5 Fault Tolerance

A system that is characterized as being fault tolerant is one which possess the ability to continue makingresources available and offering services, despite hardware or software failures. Typically, this isachieved by redundancy or duplicity in hardware components like CPU, memory, and I/O subsystems, butcan also include software components.

High availability does not always imply fault tolerance. For example, a system that has remained availablefor an entire year, is said to possess high availability. However, unless the system could actually continueto remain available in the wake of disk or networking interface failure, it would not be considered as beinga fault tolerant system.

Copyright © 2006, MySQL AB Page 8 of 20

8/8/2019 MySQL Whitepaper Guide to DB High Availability

http://slidepdf.com/reader/full/mysql-whitepaper-guide-to-db-high-availability 9/20

3.6 Single Point of Failure

A single point of failure is typically a hardware or software component whose loss or failure results in adenial of service. Typically these components are lacking a paired, redundant or complimentarysubstitute. A fully-realized high availability system removes any single point of failure within the system.

3.7 Fail OverWhen a component in a high availability system fails, there is a resulting loss of service. Typically when aservice is no longer available, it is started on another component within the system. This transfer ofservice following a failure is known as a “fail over”. For example, many high availability servers will beconfigured with at least two network interface cards. One reason for this (aside from performancereasons), is to guard against the possible event that if an individual card fails, given the correct capacityand fail over planning, networking service for the server should continue uninterrupted.

4 Replication

In computing, replication usually involves the use of additional hardware or software in order to improveavailability, reliability, fault tolerance, or performance. It is commonly thought of in the context of copyingor duplicating data from one physical location or host to another. Replication is typically performed eithersynchronously or asynchronously. Synchronous data replication implies that data is committed to two ormore machines at the same time. Asynchronous data replication implies that data is copied from onemachine to another, with a resultant delay, often determined by networking bandwidth, resourceavailability or a user set time interval.

There are two forms of replication which are often employed in high availability MySQL configurations.They can include both file-based and database-centric replication, or a combination of both.

4.1 File-Based Replication

File system replication that is performed in real time can be achieved by using what is known as blocklevel replication. A popular synchronous block level replication package currently available is DistributedReplicated Block Device or DRBD for Linux-based operating systems. DRDB is discussed in greaterdetail as a MySQL high availability solution in Part Two of this white paper series.

4.2 Database Replication

The replication of databases is mostly implemented in a master to slave relationship or sometimes in amaster to many slaves configuration. It can also be thought of as “replicating” data between a source anda target. In most database replication scenarios, the master server will log the changes to the database.Once these changes have been logged, they are then sent and applied to the slave or slaves immediatelyor at a set time interval. The “appearance” of the data on the slaves may also be impacted by resourceutilization and bandwidth issues. This can be especially true with high transactional applications where

there is an abundance of updates (writes) or when replication is conducted over a WAN. Replication isoften employed in a scale-out implementation so that requests which simply “read” data can be directedto slave servers. This allows transactions involving writes to be exclusively executed on the masterserver. This typically leads to not only a performance boost but a more efficient use of resources.

MySQL Replication is discussed in greater detail in the second part of this white paper series.

Copyright © 2006, MySQL AB Page 9 of 20

8/8/2019 MySQL Whitepaper Guide to DB High Availability

http://slidepdf.com/reader/full/mysql-whitepaper-guide-to-db-high-availability 10/20

5 Clustering

Although the type of clustering we will be focusing on primarily in this paper will be related to databases, itdoes merit briefly mentioning other types of clustering that can be implemented in conjunction with or aspart of a high availability database solution.

5.1 Service Clusters

High availability service clusters are implemented primarily for the purpose of improving the availability ofthe services or processes for which the cluster provides. This can include applications, DNS, web,database or other services. These clusters are characterized by having redundant nodes, which are thenused to provide the service when its original provider fails to do so. The most common configuration for aservice cluster is two nodes. This is the minimum required to provide redundancy. Clusterimplementations help to manage the redundancy required in order to eliminate single points of failure.There are many commercial and non-commercial implementations of high availability clusters for manyoperating systems.

5.2 Load Balancing Clusters

Load balancing clusters funnel all of a system’s workload through one or more load balancing front ends.These front ends then distribute the load to an array of servers on the back end. These back end severscan be web, database or application servers. Although load balancers are usually implemented forimproving performance, they commonly include high availability features as well, such as virtual IPmanagement. A “server farm” is a term often used to describe these types of clusters. Similar to theservice clusters mentioned above, there are many commercial and non-commercial load balancingclusters available.

5.3 Database Clusters

There are two generally accepted categories of database clusters. They are often referred to as “shared-

disk” and “shared-nothing” database clusters.

5.3.1 Shared-Disk Database Clusters

The most common configuration for this type of a database cluster is two nodes. Two nodes is typicallyrequired to provide the minimum amount of redundancy. Of course these types of clusters can consist ofmany more nodes. Shared-disk database clusters can usually be categorized into one of the followingarchitecture models:

• Active/Active - In this type of a cluster, traffic intended for the failed node is either passed ontoan existing node or load balanced across the remaining nodes. This type of fail over is usuallyonly possible when the nodes utilize an identical software configuration.

Active/Passive - This configuration provides a fully redundant instance of each node. This“passive” node is only brought online when the associated “active” node fails. This configurationtypically requires the greatest amount of additional hardware. As the name suggests, thishardware remains passive and under-utilized for potentially long periods of time until a fail over ormaintenance operation is initialized.

• N+1 – In this type of cluster, an extra node is brought online to take over the role of the node thathas failed. In the event of a mixed software configuration on each primary node, the extra nodemust be universally capable of assuming any of roles of the primary nodes it is responsible for.This normally refers to clusters which have multiple services running simultaneously. For

Copyright © 2006, MySQL AB Page 10 of 20

8/8/2019 MySQL Whitepaper Guide to DB High Availability

http://slidepdf.com/reader/full/mysql-whitepaper-guide-to-db-high-availability 11/20

8/8/2019 MySQL Whitepaper Guide to DB High Availability

http://slidepdf.com/reader/full/mysql-whitepaper-guide-to-db-high-availability 12/20

6.2 Service Level Agreements

Often, organizations are driven to adopt high availability database solutions in order to satisfy internaland/or external Service Level Agreements (SLA). These are formal written agreements made betweentwo parties: the service provider and the service recipient. Generally, an SLA contains clauses defining a

specified level of service, support options, incentive awards for service levels exceeded and/or penaltyprovisions for services not provided. Satisfying or exceeding SLAs are critical for both parties. Oftentimes, the revenue of both the service provider and consumer are dictated by meeting or exceeding theseavailability requirements. For example, a business which has decided to have its customer relationssoftware hosted by a 3 rd-party provider, will be dramatically effected if its sales and customerrepresentatives cannot make use of the CRM application. A small amount of off hour downtime can betolerated, but obviously not during a peak sales period.

When determining how much unplanned downtime will cost your business, it is important to assess thepractical impact it will have on your customers, contractors, partners and employees. At a lower level,thought should be given to the ongoing ability to process transactions, both those that pose an immediatethreat to revenue and those that do not.

How many transactions can be lost without significantly impacting revenue or productivity?• Does a majority of the business depend upon one or more mission critical applications?• How much revenue would be lost for every hour these critical applications remain unavailable?• Are there periods of time, for example the end of fiscal quarters or holiday seasons, when an

outage would cause a greater disruption?• How will productivity be affected if critical applications become unavailable? (This can often

dramatically impact businesses with a significant portion of their workforce geographicallydistributed or telecommuting.)

• In the event of an unexpected outage, how will the business processes which are engaged in bypartners, vendors and customers be affected?

• Historically, what has been the total cost of lost productivity and revenue during unplanneddowntime?

One last consideration in the discussion of SLAs, is the level and access to technical support that thevendor can offer. In this regard MySQL offers varying levels of support, up to 24x7 with no specialrequirement for “issue escalations”.

6.3 Fail Over Requirements

Depending on the business criticality of the application or the terms of the service level agreementbetween the service provider and consumer, there may be a maximum amount of time deemedacceptable to recover from a component failure or loss of service. This may range from as little as a fewmilliseconds to several seconds or minutes. The concept of failing over may be applied to individualcomponents within the high availability system, like a networking interface or a storage disk, but also tothe system as a whole. For example, in the event of a natural disaster, how quickly can the system failover to another system which may be in a different, more desirable geographic location?

6.4 Open Source, Proprietary and Mixed Technology Stacks

Another important consideration when evaluating high availability database solutions is whether or not thesolution should be made up of open source, proprietary or a mix of these types of components.Depending on the component in question, there will be advantages and disadvantages in selecting anopen source or proprietary solution. For example, selecting an open source component for a critical pieceof infrastructure, for which there exists no commercial support, active development and/or documentation,will likely limit the success of the system. This strategy may make sense if one is ready to assume the

Copyright © 2006, MySQL AB Page 12 of 20

8/8/2019 MySQL Whitepaper Guide to DB High Availability

http://slidepdf.com/reader/full/mysql-whitepaper-guide-to-db-high-availability 13/20

responsibility of supporting, modifying and documenting the source code. In another example, using anopen source component over a proprietary component, as in the case of the operating system, makesperfect sense. In the case of Linux, there are several distributions to choose from, with various supportoptions, including many supported high availability products. Choosing Linux over a proprietary operatingsystem may yield many benefits besides the up front costs. It does also provide the advantage offlexibility and interoperability based on open standards. In general there are many benefits to selecting anopen source technology stack for your high availability database solution. A key advantage of MySQL isthat whatever high availability solution you decide to implement, MySQL easily supports both proprietary,mixed and pure open source stacks.

6.5 Security Considerations

Security is another requirement to consider when determining which high availability database solution isright for your organization. To what degree does certain security functionality need to be integrated intothe system and into the various components? For example, is it necessary for the nodes within a clusterto communicate over an encrypted protocol or channel? Does the application need to access encrypteddata transparently? Aside from the security features inherent to the various components you select whendesigning your system, below are some of the security features that can be found natively in the MySQLserver.

• An ACL-based security model• Support for yaSSL• Data encryption• A fine-grained access system from hosts, down to the table column-level• A privilege system for managing the ability to connect and perform data operations• Connection and statement logging

6.6 Hardware Requirements

The hardware requirements of your high availability database system can often make or break thebudgetary constraints of the project. Some questions to entertain when evaluating solutions include:

• Does the solution allow me to leverage off-the shelf commodity components?• Does the solution require additional components like shared storage, load balancers or special

networking components?• If there is a requirement to increase capacity or redundancy, can this be achieved incrementally

using a scale-out methodology or does it require a “fork-lift” approach using larger and moreexpensive symmetric multi-processing (SMP) hardware?

6.7 Storage Considerations

One of the most important single points of failure to mitigate when designing a high availability system isthe hardware and software used for the storage and management of the underlying data. Highly reliablestorage technologies include using a combination of the appropriate level of redundant array ofindependent disks (RAID), a storage area network (SAN), network-attached storage (NAS) and/or

journaling and distributed file systems (JFS).

SAN and NAS systems provide improved data availability by allowing for the distribution of systemcomponents and lessening the likelihood of a single point of failure. Although SAN and NAS devicesshare many similar characteristics, the key difference is that a SAN will use a block-based protocol andwill generally run over an independent, specialized storage network.

It should also be noted that although RAID, SAN and NAS data stores can increase availability, theirinherent distribution of the system’s data and the need for increased computational resources, often

Copyright © 2006, MySQL AB Page 13 of 20

8/8/2019 MySQL Whitepaper Guide to DB High Availability

http://slidepdf.com/reader/full/mysql-whitepaper-guide-to-db-high-availability 14/20

necessitates the need to implement some form of data replication, synchronization, and/or availabilitymanagement. It should be noted that in general, NAS devices do not make for good database storageand MySQL recommends against their use under normal circumstances.

6.7.1 RAID

Depending on the level selected, RAID provides increased data integrity, fault-tolerance, throughputand/or capacity when compared to using individual drives. At its core, RAID combines multiple storagedrives into a single logical unit. This allows an operating system to see one, instead of multiple storagedrives. RAID is usually (but not necessarily) implemented with identically-sized disks. Original RAIDspecifications suggested a number of "RAID levels", or combinations of disks. These levels are typicallylabeled 0 through 5. Each of these RAID levels has its own advantages, disadvantages and preferred usecases in Figure 4.

• RAID 0: Data Striping• RAID 1: Disk Mirroring/Disk Duplex• RAID 0+1: Data mirrors over 2 or more striped disks. (Requires at least 4 disks.)• RAID 10: Data striped over two or more mirrored disks. (Requires at least 4 disks.)• RAID 3: Data Bit Striping With a Dedicated Parity Drive•

RAID 4: Data Striping With a Dedicated Parity Drive• RAID 5: Data Striping with Striped Parity• RAID 6: Data Striping like RAID 5 but with dual parity

Multi-user environments, database, file and web serversYesGoodVery Good5

Imaging, geological, seismological data, videoYesVery GoodGood4

Imaging, geological, seismological data, videoYesVery GoodGood3

Multi-user environments, database, file and web serversYesGoodVery Good0+1

Small disk capacities that require redundancyYesGoodVery Good1

Very Good

AccessTime

Applications with large disk requirements, high performance databasesNoneGood0

Use CasesRedundancyTransfer

RateRAIDLevel

Multi-user environments, database, file and web serversYesGoodVery Good5

Imaging, geological, seismological data, videoYesVery GoodGood4

Imaging, geological, seismological data, videoYesVery GoodGood3

Multi-user environments, database, file and web serversYesGoodVery Good0+1

Small disk capacities that require redundancyYesGoodVery Good1

Very Good

AccessTime

Applications with large disk requirements, high performance databasesNoneGood0

Use CasesRedundancyTransfer

RateRAIDLevel

Figure 4

As a rule of thumb, don’t use RAID 5 for an update intensive database. If the applications will be doinglots of writing to files or databases on RAID 5 sets, there will be a significant penalty placed on thosewrites. Therefore, you may notice performance problems with your databases on RAID 5 volumes. RAID10 is striped and mirrored and has much better characteristics for databases supporting many writes.Unless the database is read-only and you are under a very limited budget, it is best to avoid RAID 5.Some general advice:

• Security: is typically enhanced when employing mirroring• Performance: best achieved when the striping of disks is employed

Copyright © 2006, MySQL AB Page 14 of 20

8/8/2019 MySQL Whitepaper Guide to DB High Availability

http://slidepdf.com/reader/full/mysql-whitepaper-guide-to-db-high-availability 15/20

Deciding to implement RAID will require RAID controllers. The disks themselves can be IDE, ATA, SATA,SCSI, or Fibre Channel. The RAID controller links to the host computer with one or more high-speedconnections, either directly, or through a fabric, or is accessed as network attached storage. This RAIDcontroller handles the management of the disks, and performs parity calculations. Support for hotswapping (the ability the replace/add/delete disks “on the fly”, should be part of the overall RAID design.

6.7.2 Shared Area Networks (SAN)

Storage networks differentiate themselves from other forms of network storage by the low-level accessmethods they use. A SAN will typically be comprised of servers, disk arrays, tape libraries, or otherstorage devices.

The communications on a SAN are very similar to those used for internal disk drives, like ATA and SCSI.In a SAN, a server will issue a request for blocks of data, from a specific disk drive. This access method isknown as “block storage”. The storage device acts in a similar fashion to an internal drive, accessing thespecified block, and sending the response back across the network.

Some of the advantages of using a SAN in conjunction with MySQL include:

• Simplified administration• Increased flexibility• Storage capacity can be utilized by multiple systems• Servers can boot from the SAN• Provide more effective disaster recovery with SAN to SAN replication• Often faster and more reliable then NAS

6.7.3 Network Attached Storage

Network-attached storage systems are generally storage devices that can be accessed over a networkrather than directly being connected to a computer. This enables multiple computers to share the samestorage space at once, which minimizes the administration required to locally manage hard disks. NAS

systems usually contain one or more hard disks, often employing some form of RAID. The protocol usedwith NAS is a file based protocol such as NFS, Samba or Microsoft's Common Internet File System(CIFS).

NAS devices have become a ubiquitous storage choice for local area networks. As this is the case, theperformance of NAS device depends heavily on cached memory and networking overhead. A clearbenefit of a NAS device is that it can be a quick and easy way to provide a large virtual hard drive for agroup of users. A NAS also yields significant ease of use and simplified data management. Thedisadvantage is that any bandwidth utilization problems on the network will degrade the read and writeaccess time. This can be an especially important consideration if used leveraged as database storage.

6.8 Operating System Interoperability

Many of the options you will have (or not have) in selecting components for your system will be dictated ina large part by the operating system used. These restrictions may effect, but are not limited to, the filesystems, clustering agents, networking protocols and/or other hardware/software components which thevendors may or may not support. The MySQL Server provides binaries for many popular operatingsystems but the source code can also be compiled to run on a variety of other platforms not listed. Seehttp://www.mysql.com/support/supportedplatforms.html for more details.

Copyright © 2006, MySQL AB Page 15 of 20

8/8/2019 MySQL Whitepaper Guide to DB High Availability

http://slidepdf.com/reader/full/mysql-whitepaper-guide-to-db-high-availability 16/20

6.9 Geographic Redundancy

Depending on the disaster recovery or business continuity requirements of your application, you mayneed to also consider a redundant site located in a different geographical location. The key advantage ofhaving a database which permits the ability to replicate or mirror data to a different location is that itallows for higher degrees of availability to be achieved. Often times replication is the most cost-effective

and reliable method of achieving geographical redundancy.

7 Why MySQL?

7.1 Scalability and Flexibility

The MySQL database server provides the ultimate in scalability, sporting the capacity to handle deeplyembedded applications with a footprint of only 1MB to running massive data warehouses holdingterabytes of information. Platform flexibility is a stalwart feature of MySQL with all flavors of Linux, UNIX,and Windows being supported. And, of course, the open source nature of MySQL allows completecustomization for those wanting to add unique requirements to the database server.

7.2 High Performance

A unique storage-engine architecture allows database professionals to configure the MySQL databaseserver specifically for particular applications, with the end result being amazing performance results.Whether the intended application is a high-speed transactional processing system or a high-volume website that services a billion queries a day, MySQL can meet the most demanding performanceexpectations of any system. With high-speed load utilities, distinctive memory caches, full text indexes,and other performance-enhancing mechanisms, MySQL offers all the right ammunition for today's criticalbusiness systems.

7.3 High Availability

Rock-solid reliability and constant availability are hallmarks of MySQL, with customers relying on MySQLto guarantee around-the-clock uptime. MySQL offers a variety of high-availability options from high-speedmaster/slave replication configurations, to specialized Cluster servers offering instant failover, to thirdparty vendors offering unique high-availability solutions for the MySQL database server.

7.4 Robust Transactional Support

MySQL offers one of the most powerful transactional database engines on the market. Features includecomplete ACID (atomic, consistent, isolated, durable) transaction support, unlimited row-level locking,distributed transaction capability, and multi-version transaction support where readers never block writersand vice-versa. Full data integrity is also assured through server-enforced referential integrity, specializedtransaction isolation levels, and instant deadlock detection.

7.5 Web and Data Warehouse Strengths

MySQL is the de-facto standard for high-traffic web sites because of its high-performance query engine,tremendously fast data insert capability, and strong support for specialized web functions like fast full textsearches. These same strengths also apply to data warehousing environments where MySQL scales upinto the terabyte range for either single servers or scale-out architectures. Other features like mainmemory tables, B-tree and hash indexes, and compressed archive tables that reduce storagerequirements by up to eighty-percent make MySQL a strong standout for both web and businessintelligence applications.

Copyright © 2006, MySQL AB Page 16 of 20

8/8/2019 MySQL Whitepaper Guide to DB High Availability

http://slidepdf.com/reader/full/mysql-whitepaper-guide-to-db-high-availability 17/20

7.6 Strong Data Protection

Because guarding the data assets of corporations is the number one job of database professionals,MySQL offers exceptional security features that ensure absolute data protection. In terms of databaseauthentication, MySQL provides powerful mechanisms for ensuring only authorized users have entry to

the database server, with the ability to block users down to the client machine level being possible. SSHand SSL support are also provided to ensure safe and secure connections. A granular object privilegeframework is present so that users only see the data they should, and powerful data encryption anddecryption functions ensure that sensitive data is protected from unauthorized viewing. Finally, backupand recovery utilities provided through MySQL and third party software vendors allow for complete logicaland physical backup as well as full and point-in-time recovery.

7.7 Comprehensive Application Development

One of the reasons MySQL is the world's most popular open source database is that it providescomprehensive support for every application development need. Within the database, support can befound for stored procedures, triggers, functions, views, cursors, ANSI-standard SQL, and more. Forembedded applications, plug-in libraries are available to embed MySQL database support into nearly anyapplication. MySQL also provides connectors and drivers (ODBC, JDBC, etc.) that allow all forms ofapplications to make use of MySQL as a preferred data management server. It doesn't matter if it's PHP,Perl, Java, Visual Basic, or .NET, MySQL offers application developers everything they need to besuccessful in building database-driven information systems.

7.8 Management Ease

MySQL offers exceptional quick-start capability with the average time from software download toinstallation completion being less than fifteen minutes. This rule holds true whether the platform isMicrosoft Windows, Linux, Macintosh, or UNIX. Once installed, self-management features like automaticspace expansion, auto-restart, and dynamic configuration changes take much of the burden off alreadyoverworked database administrators. MySQL also provides a complete suite of graphical managementand migration tools that allow a DBA to manage, troubleshoot, and control the operation of many MySQLservers from a single workstation. Many third party software vendor tools are also available for MySQLthat handle tasks ranging from data design and ETL, to complete database administration, jobmanagement, and performance monitoring.

7.9 Open Source Freedom and 24 x 7 Support

Many corporations are hesitant to fully commit to open source software because they believe they can'tget the type of support or professional service safety nets they currently rely on with proprietary softwareto ensure the overall success of their key applications. The questions of indemnification come up often aswell. These worries can be put to rest with MySQL as complete around-the-clock support as well asindemnification is available through MySQL Network. MySQL is not a typical open source project as allthe software is owned and supported by MySQL AB, and because of this, a unique cost and supportmodel is available that provides a unique combination of open source freedom and trusted software withsupport.

7.10 Lowest Total Cost of Ownership

By migrating current database-drive applications to MySQL, or using MySQL for new developmentprojects, corporations are realizing significant cost savings. Accomplished through the use of the MySQLdatabase server and scale-out architectures that utilize low-cost commodity hardware, corporations arefinding that they can achieve amazing levels of scalability and performance, all at a cost that is far lessthan those offered by proprietary and scale-up software vendors. In addition, the reliability and easy

Copyright © 2006, MySQL AB Page 17 of 20

8/8/2019 MySQL Whitepaper Guide to DB High Availability

http://slidepdf.com/reader/full/mysql-whitepaper-guide-to-db-high-availability 18/20

maintainability of MySQL means that database administrators don't waste time troubleshootingperformance or downtime issues, but instead can concentrate on making a positive impact on higher leveltasks that involve the business side of data.

8 Conclusion

In this paper we set out to introduce the topic of what high availability is and the concepts around it. Wealso explored some of the considerations you should have when determining the criteria for your MySQLhigh availability solution. In the second part of this white paper series we explore the technical solutionsoffered from MySQL and its network of certified partners. These solutions include:

• MySQL Replication• MySQL Cluster• MySQL Cluster and Replication• Linux Heartbeat & MySQL Replication• Linux Heartbeat, Block-Replication & MySQL• Load-Balancing with MySQL Replication• MySQL Replication for Disaster Recovery• High Availability/Performance Networking with Dolphin Interconnect• High Availability Operating System Solutions• High Availability Middleware – Continuent m/Cluster• High Availability Middleware – High-Availability RSF-1

We also discuss the services offered to implement the high availability solutions presented in the paper,including MySQL Professional Services, MySQL Training and MySQL Network.

9 About MySQL

MySQL AB develops, markets, and supports a family of high performance, affordable database serversand tools.The company's flagship product is MySQL, the world's most popular open source database,with more than six million active installations. Many of the world's largest organizations, including Google,Sabre Holdings, The Associated Press, Suzuki and NASA, are realizing significant cost savings by usingMySQL to power web sites, business-critical enterprise applications and packaged software. MySQL ABis a second generation open source company, and supports both open source values and corporatecustomers’ needs in a profitable, sustainable business. For more information about MySQL, please go tohttp://www.mysql.com/ .

MySQL Network

MySQL® Network™ provides a comprehensive set of enterprise-grade software, support and servicesdirectly from the developers of MySQL to ensure the highest levels of reliability, security and uptime. As aproactive service that helps you eliminate problems before they occur, MySQL Network gives youeverything you need in a single, unified offering to successfully develop and deploy business criticalapplications using MySQL. To learn more, visit http://www.mysql.com/network/

MySQL Consulting

MySQL AB offers a full range of consulting services. Whether you are starting a new project, needing tooptimize an existing MySQL application, or migrating from a proprietary database to MySQL, we have anaffordable solution for you. Using industry best practices and proven methodologies, your MySQL

Copyright © 2006, MySQL AB Page 18 of 20

8/8/2019 MySQL Whitepaper Guide to DB High Availability

http://slidepdf.com/reader/full/mysql-whitepaper-guide-to-db-high-availability 19/20

certified consultant will help you deliver on-time and on-budget. To see the complete list of consultingofferings, visit http://www.mysql.com/consulting/

MySQL High Availability SolutionMySQL senior consultants use proven methodologies and expertise in database Clustering,Replication, Fail-Over, Fault-Tolerance and other HA techniques to work closely with your team todeliver a High Availability MySQL solution. This solution covers the process of designing, testing,deploying and operating a modern database infrastructure that delivers on your preciserequirements for performance and high-availability.

MySQL Remote DBA SolutionA dedicated MySQL Remote DBA will work closely with your DBA team to design, install,configure, tune, secure, monitor, manage and administer your MySQL databases. MySQL seniorconsultants use proven methodologies and expertise in database Administration, Security,Performance Tuning, Replication, Backup, and Fault-Tolerance to ensure success.

MySQL Training

MySQL offers a comprehensive set of MySQL training courses. To see the complete list of courses andschedules, visit http://www.mysql.com/training/

MySQL for DevelopersThis instructor-led, hands-on class will teach Developers techniques for building databaseapplications on MySQL. This course covers essential SQL for data design, querying, andprogramming. In addition, the class will prepare students for the MySQL Developer certification.

MySQL for DBAs This instructor led, hands-on class will teach DBAs to install, configure, tune, secure, monitor, andmanage their MySQL database servers. In addition, the class will prepare students for theMySQL DBA certification.

10 Resources

Below are links to additional resources from MySQL.

10.1 White Papers

http://www.mysql.com/why-mysql/white-papers/

10.2 Case Studies

http://www.mysql.com/why-mysql/case-studies/

10.3 Press Releases, News and Events

http://www.mysql.com/news-and-events/

10.4 Live Webinars

http://www.mysql.com/news-and-events/web-seminars/

Copyright © 2006, MySQL AB Page 19 of 20

8/8/2019 MySQL Whitepaper Guide to DB High Availability

http://slidepdf.com/reader/full/mysql-whitepaper-guide-to-db-high-availability 20/20

10.5 Webinars on Demand

http://www.mysql.com/news-and-events/on-demand-webinars/


Recommended