How to Scale MySQL in Support of Drupal
-
Upload
acquia -
Category
Technology
-
view
8.240 -
download
10
Transcript of How to Scale MySQL in Support of Drupal
![Page 1: How to Scale MySQL in Support of Drupal](https://reader031.fdocuments.in/reader031/viewer/2022020122/555e3bfbd8b42a63048b4e19/html5/thumbnails/1.jpg)
Flex Your Database™
How to Scale MySQL in Support of Drupal
Oct 23, 2012
![Page 2: How to Scale MySQL in Support of Drupal](https://reader031.fdocuments.in/reader031/viewer/2022020122/555e3bfbd8b42a63048b4e19/html5/thumbnails/2.jpg)
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
![Page 3: How to Scale MySQL in Support of Drupal](https://reader031.fdocuments.in/reader031/viewer/2022020122/555e3bfbd8b42a63048b4e19/html5/thumbnails/3.jpg)
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
![Page 4: How to Scale MySQL in Support of Drupal](https://reader031.fdocuments.in/reader031/viewer/2022020122/555e3bfbd8b42a63048b4e19/html5/thumbnails/4.jpg)
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
![Page 5: How to Scale MySQL in Support of Drupal](https://reader031.fdocuments.in/reader031/viewer/2022020122/555e3bfbd8b42a63048b4e19/html5/thumbnails/5.jpg)
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
![Page 6: How to Scale MySQL in Support of Drupal](https://reader031.fdocuments.in/reader031/viewer/2022020122/555e3bfbd8b42a63048b4e19/html5/thumbnails/6.jpg)
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
![Page 7: How to Scale MySQL in Support of Drupal](https://reader031.fdocuments.in/reader031/viewer/2022020122/555e3bfbd8b42a63048b4e19/html5/thumbnails/7.jpg)
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
![Page 8: How to Scale MySQL in Support of Drupal](https://reader031.fdocuments.in/reader031/viewer/2022020122/555e3bfbd8b42a63048b4e19/html5/thumbnails/8.jpg)
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
![Page 9: How to Scale MySQL in Support of Drupal](https://reader031.fdocuments.in/reader031/viewer/2022020122/555e3bfbd8b42a63048b4e19/html5/thumbnails/9.jpg)
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
![Page 10: How to Scale MySQL in Support of Drupal](https://reader031.fdocuments.in/reader031/viewer/2022020122/555e3bfbd8b42a63048b4e19/html5/thumbnails/10.jpg)
• 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
![Page 11: How to Scale MySQL in Support of Drupal](https://reader031.fdocuments.in/reader031/viewer/2022020122/555e3bfbd8b42a63048b4e19/html5/thumbnails/11.jpg)
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.
![Page 12: How to Scale MySQL in Support of Drupal](https://reader031.fdocuments.in/reader031/viewer/2022020122/555e3bfbd8b42a63048b4e19/html5/thumbnails/12.jpg)
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
![Page 13: How to Scale MySQL in Support of Drupal](https://reader031.fdocuments.in/reader031/viewer/2022020122/555e3bfbd8b42a63048b4e19/html5/thumbnails/13.jpg)
Your current configuration
Oct 23, 2012 How to Scale MySQL in Support of Drupal 13
Your Existing MySQL Database
Drupal Standard Interfaces
![Page 14: How to Scale MySQL in Support of Drupal](https://reader031.fdocuments.in/reader031/viewer/2022020122/555e3bfbd8b42a63048b4e19/html5/thumbnails/14.jpg)
How It Works—Patented Architecture
Oct 23, 2012 How to Scale MySQL in Support of Drupal 14
ParElastic
Database Virtualization Engine
Drupal Standard Interfaces
![Page 15: How to Scale MySQL in Support of Drupal](https://reader031.fdocuments.in/reader031/viewer/2022020122/555e3bfbd8b42a63048b4e19/html5/thumbnails/15.jpg)
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
![Page 16: How to Scale MySQL in Support of Drupal](https://reader031.fdocuments.in/reader031/viewer/2022020122/555e3bfbd8b42a63048b4e19/html5/thumbnails/16.jpg)
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
![Page 17: How to Scale MySQL in Support of Drupal](https://reader031.fdocuments.in/reader031/viewer/2022020122/555e3bfbd8b42a63048b4e19/html5/thumbnails/17.jpg)
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
![Page 18: How to Scale MySQL in Support of Drupal](https://reader031.fdocuments.in/reader031/viewer/2022020122/555e3bfbd8b42a63048b4e19/html5/thumbnails/18.jpg)
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
![Page 19: How to Scale MySQL in Support of Drupal](https://reader031.fdocuments.in/reader031/viewer/2022020122/555e3bfbd8b42a63048b4e19/html5/thumbnails/19.jpg)
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
![Page 20: How to Scale MySQL in Support of Drupal](https://reader031.fdocuments.in/reader031/viewer/2022020122/555e3bfbd8b42a63048b4e19/html5/thumbnails/20.jpg)
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)
![Page 21: How to Scale MySQL in Support of Drupal](https://reader031.fdocuments.in/reader031/viewer/2022020122/555e3bfbd8b42a63048b4e19/html5/thumbnails/21.jpg)
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
![Page 22: How to Scale MySQL in Support of Drupal](https://reader031.fdocuments.in/reader031/viewer/2022020122/555e3bfbd8b42a63048b4e19/html5/thumbnails/22.jpg)
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
![Page 23: How to Scale MySQL in Support of Drupal](https://reader031.fdocuments.in/reader031/viewer/2022020122/555e3bfbd8b42a63048b4e19/html5/thumbnails/23.jpg)
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
![Page 24: How to Scale MySQL in Support of Drupal](https://reader031.fdocuments.in/reader031/viewer/2022020122/555e3bfbd8b42a63048b4e19/html5/thumbnails/24.jpg)
Oct 23, 2012 How to Scale MySQL in Support of Drupal 24
Performance
![Page 25: How to Scale MySQL in Support of Drupal](https://reader031.fdocuments.in/reader031/viewer/2022020122/555e3bfbd8b42a63048b4e19/html5/thumbnails/25.jpg)
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
![Page 26: How to Scale MySQL in Support of Drupal](https://reader031.fdocuments.in/reader031/viewer/2022020122/555e3bfbd8b42a63048b4e19/html5/thumbnails/26.jpg)
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
![Page 27: How to Scale MySQL in Support of Drupal](https://reader031.fdocuments.in/reader031/viewer/2022020122/555e3bfbd8b42a63048b4e19/html5/thumbnails/27.jpg)
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
![Page 28: How to Scale MySQL in Support of Drupal](https://reader031.fdocuments.in/reader031/viewer/2022020122/555e3bfbd8b42a63048b4e19/html5/thumbnails/28.jpg)
Oct 23, 2012 How to Scale MySQL in Support of Drupal 28
Questions and Answers
![Page 29: How to Scale MySQL in Support of Drupal](https://reader031.fdocuments.in/reader031/viewer/2022020122/555e3bfbd8b42a63048b4e19/html5/thumbnails/29.jpg)
Oct 23, 2012 How to Scale MySQL in Support of Drupal 29
Query Execution & Screenshots
![Page 30: How to Scale MySQL in Support of Drupal](https://reader031.fdocuments.in/reader031/viewer/2022020122/555e3bfbd8b42a63048b4e19/html5/thumbnails/30.jpg)
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%’
![Page 31: How to Scale MySQL in Support of Drupal](https://reader031.fdocuments.in/reader031/viewer/2022020122/555e3bfbd8b42a63048b4e19/html5/thumbnails/31.jpg)
How It Works—Simple Query
Oct 3, 2012 ParElastic Overview 31
SELECT n.nid, n.title from node n
where n.title like '%cloud%’
![Page 32: How to Scale MySQL in Support of Drupal](https://reader031.fdocuments.in/reader031/viewer/2022020122/555e3bfbd8b42a63048b4e19/html5/thumbnails/32.jpg)
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
![Page 33: How to Scale MySQL in Support of Drupal](https://reader031.fdocuments.in/reader031/viewer/2022020122/555e3bfbd8b42a63048b4e19/html5/thumbnails/33.jpg)
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
![Page 34: How to Scale MySQL in Support of Drupal](https://reader031.fdocuments.in/reader031/viewer/2022020122/555e3bfbd8b42a63048b4e19/html5/thumbnails/34.jpg)
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
![Page 35: How to Scale MySQL in Support of Drupal](https://reader031.fdocuments.in/reader031/viewer/2022020122/555e3bfbd8b42a63048b4e19/html5/thumbnails/35.jpg)
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
![Page 36: How to Scale MySQL in Support of Drupal](https://reader031.fdocuments.in/reader031/viewer/2022020122/555e3bfbd8b42a63048b4e19/html5/thumbnails/36.jpg)
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
![Page 37: How to Scale MySQL in Support of Drupal](https://reader031.fdocuments.in/reader031/viewer/2022020122/555e3bfbd8b42a63048b4e19/html5/thumbnails/37.jpg)
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
![Page 38: How to Scale MySQL in Support of Drupal](https://reader031.fdocuments.in/reader031/viewer/2022020122/555e3bfbd8b42a63048b4e19/html5/thumbnails/38.jpg)
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
![Page 39: How to Scale MySQL in Support of Drupal](https://reader031.fdocuments.in/reader031/viewer/2022020122/555e3bfbd8b42a63048b4e19/html5/thumbnails/39.jpg)
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