Supercharge your MySQL application performance with Cloud Databases J.R. Arredondo Director Product Marketing Kelly Goolsby Sales Engineering Manager Daniel Morris Senior Product Manager Dave Fowler Founder Chartio 1
This is what we will cover today Short overview of Cloud Databases Using Cloud Databases with Control Panel and MySQL Workbench Using Cloud Databases with your Wordpress blog Data analytics and visualizations with Cloud Databases and Chartio New features! Measuring performance using Sysbench 2
Short overview of Cloud Databases Using Cloud Databases with Control Panel and MySQL Workbench Using Cloud Databases with your Wordpress blog Data analytics and visualizations with Cloud Databases and Chartio New features! Measuring performance using Sysbench 3
Portfolio
Relational Databases: a pillar of computing Simple notions (SQL) Tables, Columns, Data types Constraints Referential Integrity Relationships Indexes Relational Algebra ( Queries ) Transactions lead to powerful solutions Data store and retrieval Data organization Data integrity Transactional applications Reporting and Querying Systems of record 5
Relational Database Management Systems (RDMS) are difficult to manage and operate Expectations are high High Performance Reliability Resilience Short development times No room for error Implementation is difficult Storage complexities Hardware dependencies Complex installation Complex configuration Maintenance and Administration Backup, monitoring, tuning Database Administrators (DBAs) and developers face significant pressures to perform their jobs and add value to their businesses 6
Cloud Databases The first relational database service built on the OpenStack Nova Compute codebase Performance Reliability Simple, self-service provisioning Automated maintenance 7
Cloud Databases: Performance through containerbased (OS) virtualization Traditional hardware virtualization limits performance They virtualize key HW features Memory, processor, hard drives Critical for database performance They impose penalties for DBs Full Hardware Emulation Paravirtualization Container-based virtualization provides close to native perf No virtual hardware A single shared operating system Close to native performance Higher density Virtual Machine Virtual Machine Guest OS Guest OS Container Container Virtual Hardware Virtual Hardware Shared Host OS Hypervisor / Shared Host OS Hardware Hardware http://tinyurl.com/clouddatabases 8
Cloud Databases: Reliability through built-in data redundancy MySQL connected to SAN storage with built-in data replication Increased performance Greater reliability Less downtime
Cloud Databases: faster time to database with simple, self-service provisioning Quick provisioning: Easier to use by less skilled DBAs and developers Flexible enough for advanced users Easy to get started with your app No need to perform app changes Just connect app to the database
Cloud Databases: Automated maintenance Configuration and patching Reduces your operational costs Lets your team focus on other tasks
Short overview of Cloud Databases Using Cloud Databases with Control Panel and MySQL Workbench Using Cloud Databases with your Wordpress blog Data analytics and visualizations with Cloud Databases and Chartio New features! Measuring performance using Sysbench 12
13
X
Using Cloud Databases in your application is like using any MySQL database 30
31
<html> <head><title>connecting to Cloud Databases</title></head> <body><pre> <?php // phpinfo(); $THE_HOST = "5c70345ad036fc112dc0a14ee1db7992f5c172db.rackspaceclouddb.com"; $THE_USER = "fmdb_readonly"; $THE_PWD = "fmdb_readonly"; $THE_DB = "FEATUREMANIA"; // // Get "e" // $arg_expr = trim($_post["e"]); if($arg_expr == "") { $arg_expr = "PI()"; } else { if(get_magic_quotes_gpc()) { $arg_expr = stripslashes($arg_expr); } // // Connect to the database // $connection = mysql_connect($the_host, $THE_USER, $THE_PWD); if (!$connection) { die('i could not connect to the database. The error is: '. mysql_error()); } mysql_select_db($the_db, $connection); // // Calculation // $result = mysql_query("select (". $arg_expr. ");", $connection); $row = mysql_fetch_array($result, MYSQL_NUM); $evalue = $row[0]; printf("the database connection worked, and MySQL says that %s = %s<br>%s", $arg_expr, $evalue, mysql_error()); mysql_free_result($result); mysql_close($connection); }?> <FORM ACTION='clouddatabases.php' METHOD='POST'> Enter a MySQL expression: <INPUT TYPE="TEXT" NAME="e" VALUE="<? echo $arg_expr;?>"/> <INPUT TYPE="SUBMIT"> </FORM> This is a simple PHP example to test your connection to Rackspace Cloud Databases. It does not require your database to have any tables. It doubles as a handy way to calculate simple MySQL expressions from the browser. <BR> Because this sample uses string concatenation to compose SQL statements, only use this in your development environment in your password-protected site. <BR> EXAMPLES: PI()*3*3 curdate() 3=3 AND 4>4 MID('Rackspace',1,4) SIN(PI()/2) SHA1('Rackspace Cloud Databases') </pre></body> </html> 33
You can keep using the tools you love Using MySQL Workbench Note all Cloud Databases instances are only accessible from the Rackspace Cloud If you need to access your database from your home machine, you need a public IP address. In my case, I used a Cloud Load Balancer to get that.
Short overview of Cloud Databases Using Cloud Databases with Control Panel and MySQL Workbench Using Cloud Databases with your Wordpress blog Data analytics and visualizations with Cloud Databases and Chartio New features! Measuring performance using Sysbench 43
Using Cloud Databases in your Wordpress blog What I have already done Gotten a domain pointed at Rackspace DNS & my Cloud Servers IP address Set up a windows cloud server Installed WordPress using Microsoft web platform installer Deleted WP- Config file Disabled MySQL 44
Spin Up A Cloud Database Instance 45
Go to the domain after deleting WP Configuration file 46
Creating a New WordPress Configuration File 47
Configuring Wordpress for Cloud Databases 48
After Hitting Submit You Will Get This Page 49
Now you can go ahead with the configuration 50
Success!!! 51
Backup Your Cloud Database 52
Backup Your Cloud Database mysqldump -A -v -h yourhostname.rackspaceclouddb.com -u yourusername -p > backup.sql 53
Short overview of Cloud Databases Using Cloud Databases with Control Panel and MySQL Workbench Using Cloud Databases with your Wordpress blog Data analytics and visualizations with Cloud Databases and Chartio New features! Measuring performance using Sysbench 54
Dave Fowler, Founder of Chartio 55
56
Video 57
Short overview of Cloud Databases Using Cloud Databases with Control Panel and MySQL Workbench Using Cloud Databases with your Wordpress blog Data analytics and visualizations with Cloud Databases and Chartio New features! Measuring performance using Sysbench 58
New Features Now Available! Higher memory flavors: We are adding the option to create 8GB and 16GB instances, four times what was previously available. The new flavors have more memory, CPU, network bandwidth, and I/O priority, which give you greater performance for your workloads and, as you can see in the Cloud Databases pricing page, they are competitively priced. Triple storage: With more I/O comes larger datasets, so we are also tripling the maximum storage for instances from 50GB to 150GB. Storage capacity alerts: To help you avoid inadvertently reaching your storage limit, we will automatically send you a ticket when you consume more than 90% of your storage allocation. Enhanced user management: We are giving you the ability to perform password changes and to assign user access on existing database users via the API (coming soon to the Control Panel). 59
Short overview of Cloud Databases Using Cloud Databases with Control Panel and MySQL Workbench Using Cloud Databases with your Wordpress blog Data analytics and visualizations with Cloud Databases and Chartio New features! Measuring performance using Sysbench 60
Installing Sysbench 61
Sysbench (PREPARE) 62
Sysbench (RUN) 63
Sysbench (CLEANUP) 64
Performance of Cloud Databases Sysbench transactions per second (TPS): OLTP workload, 64 threads, 5-run average 65
Data Solutions SQL Cloud or Dedicated setups Deep expertise in each DB Fast time to solution Unparalleled support NoSQL Simplified provisioning Fast and reliable apps Easy scale Automated admin Big Data Faster time to insight Deployment choices A rich partner ecosystem MySQL SQL Server Oracle ObjectRocket (MongoDB) Redis to Go (Redis) Apache Hadoop Hortonworks Data Platform
What did we cover today? Cloud Databases is a high performance MySQL service on the cloud You can easily use it with Control Panel and MySQL Workbench Connecting Cloud Databases to your Wordpress blog is simple You can use Chartio with Cloud Databases for data visualization New 8GB and 16GB flavors and 3x maximum storage Your mileage will vary, but Sysbench can give you a good idea of perf 67
@jrarredondo RACKSPACE HOSTING 5000 WALZEM ROAD SAN ANTONIO, TX 78218 US SALES: 1-800-961-2888 US SUPPORT: 1-800-961-4454 WWW.RACKSPACE.COM RACKSPACE HOSTING RACKSPACE US, INC. RACKSPACE AND FANATICAL SUPPORT ARE SERVICE MARKS OF RACKSPACE US, INC. REGISTERED IN TH E UNITED STATES AND OTHER COUNTRIES. WWW.RACKSPACE.COM