Date post: | 22-May-2015 |
Category: |
Technology |
Upload: | acquia |
View: | 8,240 times |
Download: | 10 times |
Flex Your Database™
How to Scale MySQL in Support of Drupal
Oct 23, 2012
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?
Oct 23, 2012 How to Scale MySQL in Support of Drupal 2
Simplified Drupal Architecture
Oct 23, 2012 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
Oct 23, 2012 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
Oct 23, 2012 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!
Oct 23, 2012 How to Scale MySQL in Support of Drupal 6
CDN
Accelerator
Cache MySQL
Apache
PHP
Scaling the database tier – some options
Oct 23, 2012 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
Oct 23, 2012 How to Scale MySQL in Support of Drupal 8
Client
Drupal Cache
MySQL Slave
MySQL Master
MySQL Slave
reads reads reads & 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
Oct 23, 2012 How to Scale MySQL in Support of Drupal 9
• What is ParElastic?
– Elastic Database Virtualization for Standard Relational Databases
• Makes multiple database instances appear to Drupal as a single
database server
• Who is it for?
– Interactive web scale applications such as digital gaming, eCommerce,
and social networks
– Multi-tenant and SaaS applications (e.g. Drupal Multisite)
– Service providers (public or private cloud) who wish to offer DBaaS
• Why do they need it?
– Database scalability is a significant impediment to innovation and growth
– Existing solutions increase cost & risk:
• Non-standard, Complex to implement and manage, Expensive to
acquire, Inelastic
Oct 23, 2012 How to Scale MySQL in Support of Drupal 10
Our Solution: Flex Your DatabaseTM
Oct 23, 2012 How to Scale MySQL in Support of Drupal 11
ParElastic Database
Virtualization Engine™
The only solution that brings flexibility
to all dimensions of your database.
• Scale Out Your Database On Demand
• Dynamically Add Storage or Processing.
Pay Only for What You Use.
• Uses Your Existing Database and Application.
No Risk or Disruption.
Flex Your Database™
Scales Out Your Database On Demand.
Oct 23, 2012 How to Scale MySQL in Support of Drupal 12
what Drupal sees what Drupal feels
Your current configuration
Oct 23, 2012 How to Scale MySQL in Support of Drupal 13
Your Existing MySQL Database
Drupal Standard Interfaces
How It Works—Patented Architecture
Oct 23, 2012 How to Scale MySQL in Support of Drupal 14
ParElastic
Database Virtualization Engine
Drupal Standard Interfaces
Off-the-Shelf MySQL Databases
(persistent)
Transparent partitioning,
and replication
How It Works—Patented Architecture
Oct 23, 2012 How to Scale MySQL in Support of Drupal 15
ParElastic
Database Virtualization Engine
Drupal
Multiple database servers
act as one
Storage
Standard Interfaces
Off-the-Shelf MySQL Databases
(persistent)
Transparent partitioning,
and replication
How It Works—Patented Architecture
Oct 23, 2012 How to Scale MySQL in Support of Drupal 16
ParElastic
Database Virtualization Engine
Drupal
Multiple database servers
act as one
Storage
Add storage without
moving existing data
Standard Interfaces
USPTO Publication 2012/0041976
Off-the-Shelf MySQL Databases
(persistent)
Transparent partitioning,
and replication
How It Works—Patented Architecture
Oct 23, 2012 How to Scale MySQL in Support of Drupal 17
ParElastic
Database Virtualization Engine
Drupal
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
Standard Interfaces
US Patent 8214356
Off-the-Shelf MySQL Databases
(persistent)
Drupal multi-site with ParElastic
Oct 23, 2012 How to Scale MySQL in Support of Drupal 18
ParElastic Database Virtualization Engine:
Multiple database servers
act as one
Drupal
Off-the-Shelf MySQL Databases
(dynamic)
Processing Storage
Drupal
Drupal
Drupal
Drupal
Off-the-Shelf MySQL Databases
(persistent)
Transparent partitioning,
and replication
High Availability
Oct 23, 2012 How to Scale MySQL in Support of Drupal 19
Drupal
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
ParElastic
Database Virtualization Engine
Standard Interfaces
Transparent partitioning,
and replication
High Availability
Oct 23, 2012 How to Scale MySQL in Support of Drupal 20
Drupal
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
ParElastic
Database Virtualization Engine
Standard Interfaces
Off-the-Shelf MySQL Databases
(persistent)
Key Features
• Adaptive provisioning
• Automated data distribution
• Scale reads AND writes
• Optimized for Drupal Multi-Site
• “Cross-Shard” operations
Oct 23, 2012 How to Scale MySQL in Support of Drupal 21
Flex Your Database™
Dynamically Adds Storage and Processing. Pay Only for What You Use.
Oct 23, 2012 How to Scale MySQL in Support of Drupal 22
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.
Oct 23, 2012 How to Scale MySQL in Support of Drupal 23
without ParElastic with ParElastic
Time Spent
on Drupal
Time Spent
on Infrastructure
Oct 23, 2012 How to Scale MySQL in Support of Drupal 24
Performance
Performance: On Amazon AWS
Oct 23, 2012 How to Scale MySQL in Support of Drupal 25
Performance: 6x Cost: < 2x
MySQL (Native) • m1.xlarge • MySQL 5.5 • 1TB EBS
ParElastic • 5x m1.large • MySQL 5.5 • 5x 200GB EBS
Test Driver • m1.xlarge
Benefits—ParElastic Delivers
• No Drupal modifications!
• Unprecedented flexibility
• Outstanding user experiences
• Lower operational costs
• No risk
• Faster time to market
Oct 23, 2012 How to Scale MySQL in Support of Drupal 26
Useful links and additional information
Oct 23, 2012 How to Scale MySQL in Support of Drupal 27
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
www.parelastic.com/request-demo
Sign up for a beta www.parelastic.com/apply-for-beta
Oct 23, 2012 How to Scale MySQL in Support of Drupal 28
Questions and Answers
Oct 23, 2012 How to Scale MySQL in Support of Drupal 29
Query Execution & Screenshots
Off-the-Shelf MySQL Databases
(persistent)
How It Works—Simple Select
Oct 3, 2012 ParElastic Overview 30
ParElastic
Database Virtualization Engine
Application
Off-the-Shelf MySQL Databases
(dynamic)
Processing Storage
Standard Interfaces
SELECT n.nid, n.title from node n
where n.title like '%cloud%’
How It Works—Simple Query
Oct 3, 2012 ParElastic Overview 31
SELECT n.nid, n.title from node n
where n.title like '%cloud%’
Off-the-Shelf MySQL Databases
(persistent)
How It Works—Query by Shard Key
Oct 3, 2012 ParElastic Overview 32
ParElastic
Database Virtualization Engine
Application
Off-the-Shelf MySQL Databases
(dynamic)
Processing Storage
Standard Interfaces
SELECT n.nid, n.title from node n
where n.nid=20
How It Works—Query by Shard Key
Oct 3, 2012 ParElastic Overview 33
SELECT n.nid, n.title from node n
where n.nid=20
Off-the-Shelf MySQL Databases
(persistent)
How It Works—Ordered Result
Oct 3, 2012 ParElastic Overview 34
ParElastic
Database Virtualization Engine
Application
Off-the-Shelf MySQL Databases
(dynamic)
Processing Storage
Standard Interfaces
SELECT n.nid, n.title from node n
where n.nid<20 order by n.title
How It Works—Ordered Result
Oct 3, 2012 ParElastic Overview 35
SELECT n.nid, n.title from node n
where n.nid<20 order by n.title
Off-the-Shelf MySQL Databases
(persistent)
How It Works—Parallel Join
Oct 3, 2012 ParElastic Overview 36
ParElastic
Database Virtualization Engine
Application
Off-the-Shelf MySQL Databases
(dynamic)
Processing Storage
Standard Interfaces
SELECT n.nid, n.title, f.body_value from node n,
field_data_body f where n.title like '%bigdata%'
and f.entity_id=n.nid
How It Works—Parallel Join
Oct 3, 2012 ParElastic Overview 37
SELECT n.nid, n.title, f.body_value from node n,
field_data_body f where n.title like '%bigdata%'
and f.entity_id=n.nid
Off-the-Shelf MySQL Databases
(persistent)
How It Works—Local Join
Oct 3, 2012 ParElastic Overview 38
ParElastic
Database Virtualization Engine
Application
Off-the-Shelf MySQL Databases
(dynamic)
Processing Storage
Standard Interfaces
SELECT n.nid, n.title, s.comment_count from node
n, node_comment_statistics s where title like
'%bigdata%' and s.nid=n.nid
How It Works—Local Join
Oct 3, 2012 ParElastic Overview 39
SELECT n.nid, n.title, s.comment_count from node
n, node_comment_statistics s where title like
'%bigdata%' and s.nid=n.nid