26
Flex Your DatabaseHow to Scale MySQL in Support of Drupal April 3, 2013

How to Scale MySQL in Support of Drupal [April 3, 2013]

  • Upload
    acquia

  • View
    2.588

  • Download
    1

Embed Size (px)

Citation preview

Page 1: How to Scale MySQL in Support of Drupal [April 3, 2013]

Flex Your Database™

How to Scale MySQL in Support of Drupal

April 3, 2013

Page 2: How to Scale MySQL in Support of Drupal [April 3, 2013]

Agenda

• How and Why database scalability impacts Drupal sites

• What are some alternatives to reduce database load?

– Are these options sufficient?

• What are some options to scale my database?

– What are the challenges?

• What is ParElastic?

– How does it help scale Drupal?

April 3, 2013 How to Scale MySQL in Support of Drupal 2

Page 3: How to Scale MySQL in Support of Drupal [April 3, 2013]

Simplified Drupal Architecture

April 3, 2013 How to Scale MySQL in Support of Drupal 3

Drupal 7

PHP

MySQL

(The Database)

Apache

Operating System Operating System

Page 4: How to Scale MySQL in Support of Drupal [April 3, 2013]

Anonymous users and Authenticated Users

April 3, 2013 How to Scale MySQL in Support of Drupal 4

CDN

Varnish

Memcached

MySQL

An

on

ymo

us

Au

then

ticated

Page 5: How to Scale MySQL in Support of Drupal [April 3, 2013]

Anonymous users and Authenticated Users

April 3, 2013 How to Scale MySQL in Support of Drupal 5

CDN

Varnish

Memcached

MySQL

An

on

ymo

us

Au

then

ticated

• The death of the anonymous user!

• Facebook as a ‘de-facto’ single sign-on

Page 6: How to Scale MySQL in Support of Drupal [April 3, 2013]

Alternatives: Reduce the database load

• Alternatives

– Content Delivery Networks (CDN’s)

• E.g., Akamai

– Web application accelerators

• E.g., Varnish

– Object caching

• E.g., Memcached

• Shortcomings

– Works for anonymous user; not as good for authenticated users

– Works for ‘read’; no good for interaction!

April 3, 2013 How to Scale MySQL in Support of Drupal 6

CDN

Accelerator

Cache MySQL

Apache

PHP

Page 7: How to Scale MySQL in Support of Drupal [April 3, 2013]

Scaling the database tier – some options

April 3, 2013 How to Scale MySQL in Support of Drupal 7

NoSQL NewSQL

Buy bigger and bigger servers• Easy• But very expensive• Restrictive

Sharding

• Extremely complex

• Time and resource intensive

• Fragile

• Costly to implement

NoSQL and NewSQL• Requires rewrites to

application• Non-standard• Unproven and risky

$

Implications for Drupal• Custom code• Module support

Page 8: How to Scale MySQL in Support of Drupal [April 3, 2013]

Scaling the database tier - Replication

April 3, 2013 How to Scale MySQL in Support of Drupal 8

Client

DrupalCache

MySQL Slave

MySQL Master

MySQL Slave

reads readsreads & writes

replication replication

Implications for Drupal• Custom code• Module support

Page 9: How to Scale MySQL in Support of Drupal [April 3, 2013]

Scaling the database – summary of options

• The options presented thus far

– Replication; Reads targeted at slaves, Writes at Master

– Sharding

– Scale UP to larger hardware

– NoSQL or NewSQL databases

• All of these options are some combination of

– High Operation Cost

– High Maintenance Cost

– Non-Standard

– Increased Risk

– Delay Time to Market

April 3, 2013 How to Scale MySQL in Support of Drupal 9

Page 10: How to Scale MySQL in Support of Drupal [April 3, 2013]

There’s another way: ParElastic

• A database virtualization product

• Zero lines of code change in your Drupal site

• Just point your site at ParElastic

• That’s all!

April 3, 2013 How to Scale MySQL in Support of Drupal 10

Page 11: How to Scale MySQL in Support of Drupal [April 3, 2013]

Configuring Drupal with ParElastic

April 3, 2013 How to Scale MySQL in Support of Drupal 11

Page 12: How to Scale MySQL in Support of Drupal [April 3, 2013]

How It Works

April 3, 2013 How to Scale MySQL in Support of Drupal 12

Your Existing MySQL Database

ApplicationNative MySQL protocols

Page 13: How to Scale MySQL in Support of Drupal [April 3, 2013]

How It Works

April 3, 2013 How to Scale MySQL in Support of Drupal 13

ParElastic

Database Virtualization Engine

Application

Multiple database servers

act as one

Off-the-Shelf MySQL Databases

(dynamic)

Elastic database processing capacity

(add and remove as needed)

Processing Storage

Add storage without

moving existing data

Native MySQL protocols

Off-the-Shelf MySQL Databases

(persistent)

Transparent partitioning,

sharding and replication

Page 14: How to Scale MySQL in Support of Drupal [April 3, 2013]

Scalability in the Application Tier

April 3, 2013 How to Scale MySQL in Support of Drupal 14

App / PE Servers

Off the ShelfMySQL servers

Load Balancer

App App App App App App App App

ClientBrowsers

StorageProcessing

Page 15: How to Scale MySQL in Support of Drupal [April 3, 2013]

Scalability & Availability with ParElastic

April 3, 2013 How to Scale MySQL in Support of Drupal 15

App / PE Servers

Off the ShelfMySQL servers

Load Balancer

App App App App App App App App

ClientBrowsers

StorageProcessing

Replicas

Page 16: How to Scale MySQL in Support of Drupal [April 3, 2013]

Flex Your Database™

Scales Out Your Database On Demand.

April 3, 2013 How to Scale MySQL in Support of Drupal 17

what Drupal sees what Drupal feels

Page 17: How to Scale MySQL in Support of Drupal [April 3, 2013]

Key Features

• Adaptive provisioning

• Automated data distribution

• Scale reads AND writes

• Optimized for Drupal Multi-Site

• “Cross-Shard” operations

April 3, 2013 How to Scale MySQL in Support of Drupal 18

Page 18: How to Scale MySQL in Support of Drupal [April 3, 2013]

Flex Your Database™

Dynamically Adds Storage and Processing. Pay Only for What You Use.

April 3, 2013 How to Scale MySQL in Support of Drupal 19

without ParElastic:

provision for peak demand

with ParElastic:

only pay for what you use

Page 19: How to Scale MySQL in Support of Drupal [April 3, 2013]

Flex Your Database™

Use ParElastic with Drupal. No Risk or Disruption.

April 3, 2013 How to Scale MySQL in Support of Drupal 20

without ParElastic with ParElastic

Time Spent

on Drupal

Time Spent

on Infrastructure

Page 20: How to Scale MySQL in Support of Drupal [April 3, 2013]

Benefits—ParElastic Delivers

• No Drupal modifications!

• Unprecedented flexibility

• Outstanding user experiences

• Lower operational costs

• No risk

• Faster time to market

April 3, 2013 How to Scale MySQL in Support of Drupal 21

Page 21: How to Scale MySQL in Support of Drupal [April 3, 2013]

Deploying ParElastic is EASY!

• No Drupal modifications!

– For new sites

• Create the database with ParElastic

• Point Drupal at ParElastic

– For existing sites

• Create the database with ParElastic

• ‘mysqldump’ existing database

• Load ParElastic

• Point Drupal at ParElastic

April 3, 2013 How to Scale MySQL in Support of Drupal 22

Page 22: How to Scale MySQL in Support of Drupal [April 3, 2013]

April 3, 2013 How to Scale MySQL in Support of Drupal 23

Performance

Page 23: How to Scale MySQL in Support of Drupal [April 3, 2013]

Performance: On Amazon AWS

April 3, 2013 How to Scale MySQL in Support of Drupal 24

Performance: 6xCost: < 2x

MySQL (Native)• m1.xlarge• MySQL 5.5• 1TB EBS

ParElastic• 5x m1.large• MySQL 5.5• 5x 200GB EBS

Test Driver• m1.xlarge

Page 24: How to Scale MySQL in Support of Drupal [April 3, 2013]

Performance: On Amazon AWS

April 3, 2013 How to Scale MySQL in Support of Drupal

Non linear degradation

Linear Scalability

25

Page 25: How to Scale MySQL in Support of Drupal [April 3, 2013]

Useful links and additional information

April 3, 2013 How to Scale MySQL in Support of Drupal 26

Visit our website www.parelastic.com

Download our whitepaper and data sheet

www.parelastic.com/resources

View a short video about ParElastic www.parelastic.com/video

Contact us [email protected]

Michael Aubin, VP Sales & Business Development

[email protected]+1-781-832-0007

Amrith Kumar, CTO

[email protected]

See the product in action; request a demo with Drupal

www.parelastic.com/request-demo

Sign up for a trial www.parelastic.com/apply-for-trial

Page 26: How to Scale MySQL in Support of Drupal [April 3, 2013]

April 3, 2013 How to Scale MySQL in Support of Drupal 27

Questions and Answers