Upload
acquia
View
2.588
Download
1
Tags:
Embed Size (px)
Citation preview
Flex Your Database™
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
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
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
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
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
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
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
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
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
Configuring Drupal with ParElastic
April 3, 2013 How to Scale MySQL in Support of Drupal 11
How It Works
April 3, 2013 How to Scale MySQL in Support of Drupal 12
Your Existing MySQL Database
ApplicationNative MySQL protocols
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
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
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
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
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
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
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
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
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
April 3, 2013 How to Scale MySQL in Support of Drupal 23
Performance
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
Performance: On Amazon AWS
April 3, 2013 How to Scale MySQL in Support of Drupal
Non linear degradation
Linear Scalability
25
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
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
April 3, 2013 How to Scale MySQL in Support of Drupal 27
Questions and Answers