SlideShare a Scribd company logo
Scalable SaaS Data Management with Tungsten Robert Hodges CTO, Continuent, Inc.
Agenda Introductions What’s So Hard about SaaS Data Management?  Introducing Tungsten Clustering Implementing SaaS Data Management with Tungsten Commercial Support for SaaS from Continuent Definition:  SaaS = “Software as a Service”
About Continuent Our Business:  Full service database management for SaaS applications Our Value:  Ensure data are available when and where you need them  TCO less than 20% of comparable solutions Our Technical Expertise Database replication Cluster management Application connectivity SaaS applications
What’s So Hard about SaaS Data Management?
The SaaS Business Problem Meet customer SLAs Keep applications available Don’t lose or confuse customer data Meet response time requirements Enable growth More customers More volume from existing customers New service offerings Raise bottom-line profitability Keep costs of operation as low as possible Enhance add-on revenue
Successful SaaS Systems Are Complex SaaS databases quickly evolve into “big league” topologies Tenant Data Tenant Data Shared Data Tenant Apps Tenant Apps Shared Data Tenant Analytics Tenant Analytics Tenant and Shared Data
Core Technical Issue:  Multi-Tenancy Defining a flexible multi-tenant data architecture  Implementing easy-to-manage clusters Scaling performance on shared databases Protecting tenant data from loss or corruption Handling failures efficiently Upgrades and maintenance windows And do it on economical open source databases!
Introducing Tungsten Clustering
What Is Tungsten?  Tungsten implements master/slave clusters to: Protect data Maintain high availability Improve resource utilization Raise performance Install and set up in a few minutes Integrated backup/restore and data integrity checks Rule-driven management with automated failover Simple procedures for updates and maintenance SQL scaling for multi-tenant systems
What’s Inside Tungsten? Replication - Making copies Tungsten Replicator  -- Database-neutral, platform independent master/slave replication Connectivity -- Finding databases Tungsten Connector  -- Fast MySQL/PostgreSQL client to JDBC proxying Tungsten SQL Router  --JDBC wrapper for high-performance and transparent failover, load-balancing, and partitioning (no proxy required) Management -- Administering the database Tungsten Manager  -- Distributed administration with autonomic, rule-based configuration and no single point of failure Tungsten Monitor  -- Track resource status and
Tungsten Clustering In Action Master DB Slave DB Master Host Slave Host Replicator Manager/Monitor Replicator Manager/Monitor Application Server SQL Router/Connector Application Server SQL Router/Connector Management  Client Management  Client
Distributed Rule-Based Management Broadcast commands  and monitoring data Business Rules Manager #1 (Coordinator) Manager #3 Manager #2 Admin Client #1 Admin Client #3 Group  Communications Admin Client #2 Local DBMS Resources Local DBMS  Resources Local DBMS  Resources
Implementing SaaS Data Management with Tungsten
Best-Practice Multi-Tenant Architecture Separate global and tenant data Global data are same for all customers Tenant data belong to individual customer Establish shards to hold tenants Bucket tenant data into databases, schemas, or groups of tables Define data services Global data service plus a set of tenant services is typical Master data in a single location for each service Services have one master and 1+N slaves for HA/scaling Add data services as you grow TIP:  Use database as basic sharding unit
Typical SaaS Architecture globalds1 tenantds1 tenantds4 tenantds4 tenantds2 Global tenant definitions and billing data Per tenant data (usually many tenants per service) globalds1 Master/slave pair for each service Implementation tenantds2 tenantds4 tenantds3 tenantds1
Installing a Tungsten Cluster Four easy steps:  Set up host prerequisites (MySQL, Ruby, Java) Download release from  www.continuent.com  and un-tar into local directory Run ‘configure’ script Ensure MySQL is correctly configured Configure cluster networking Configure replication and choose backup method Configure connectivity Perform customizations (e.g., Master VIP setup) Configure starts services automatically
Advanced But Simple Management Tools ‘ cctrl’ is the Tungsten management client List data sources in the cluster [LOGICAL] /cluster/demo/> ls Check cluster liveness [LOGICAL] /cluster/demo/> cluster heartbeat Ensure that replication is synchronized  [LOGICAL] /cluster/demo/> cluster flush Start and stop operating system services [LOGICAL] /cluster/demo/> service */mysql restart Get help [LOGICAL] /cluster/demo/> help
Multiple Routes to Databases Java App Server Tungsten SQL Router PHP Application Tungsten Connector libmysqlclient.a Tungsten Cluster MySQL JDBC Driver Admin & Monitoring Admin & Monitoring Virtual IP  Address
Connecting Applications to Databases Tungsten SQL Router embeds in Java applications Requires Java library substitution Very high performance, seamless planned failover Tungsten Connector proxies any MySQL application Also very high performance with seamless planned failover No library changes Master Virtual IP maintained by Tungsten Failover is not seamless (broken connections) Completely transparent to applications Direct connection to database(s) Use whatever you want You are responsible for locating master/slaves yourself
Scaling Reads on Slaves Tungsten “session-consistency” distributes tenant reads to slaves if caught up with last tenant write Works with tenants sharded by database or with independent database connections Master DB Slave DB SQL Router Record tenant write position  Read if slave caught up with last tenant write
A Short Digression on Backups MySQL Server DBMS  Data Files Active Host Applications Backup HOT/COLD:  mysqldump Backup HOT: LVM snapshot  HOT: InnoDB Hot Backup COLD:  File system copy
Setting Up Backups  Tungsten provides multiple backup methods Backups can run  hot  while DBMS is live or  cold   Logical backups use native DBMS utilities mysqldump, pg_dump, etc. Can run hot on slaves Slow to dump/load and in the case of MySQL may have bugs LVM (Logical Volume Manager) backups take a snapshot of the file system Very fast; run hot on slaves Tend to be large Snapshot maintenance affects write performance Script backups integrate arbitrary backup programs TIP:  Configure backups and test them regularly
Running Backups With Tungsten Hot backup using one-line command on slave [LOGICAL] > datasource centos5a backup lvm Cold backups run on off-line master or slave [LOGICAL] > datasource centos5b offline [LOGICAL] > replicator centos5b offline [LOGICAL] >  datasource centos5b backup [LOGICAL] > replicator centos5b online Restore with one-line command [LOGICAL] > datasource centos5a restore TIP:  Keep data services small enough to backup and restore easily!
Verifying Tenant Data Copies  Tungsten incremental checks verify data without stopping replication Implemented as replication events inside Tungsten Replicator Compute MD5 on all or part of tables Can do single tables or all tables in a database Run checks from manager in combination with flush command [LOGICAL] /cluster/demo/> cluster check tenant1.* [LOGICAL] /cluster/demo/> cluster flush Slaves can either fail or warn of failures TIP:  Install consistency checks as a cron job  TIP:  Verify backups with restore + consistency check
Handling Database Failures Automatic policy mode  performs master failover automatically whenever:  A database crashes A replicator fails or crashes A server reboots or drops off the network Manual policy mode  lets you failover manually [LOGICAL] /cluster/demo/> failover Failover procedure promotes most advanced slave And points other slaves to the slave Recover command brings back failed master [LOGICAL] /cluster/demo/> datasource centos5a recover Slaves recover without admin intervention in automatic mode
Performing Planned Maintenance Tungsten supports “daylight maintenance” To perform maintenance on a slave, just take it offline [LOGICAL] /cluster/demo/> set policy maintenance [LOGICAL] /cluster/demo/> datasource centos5b offline [LOGICAL] /cluster/demo/> replicator centos5b offline To perform maintenance on a master, first do a switch to promote a new master [LOGICAL] /cluster/demo/> switch Then perform maintenance using the slave procedure Switch the master back when you are done
Upgrading Applications and Databases If you  have  a maintenance window, just upgrade the master and let replication take care of it Stop old applications and replace code Run upgrade script against master Flush and wait for slave to catch up (if necessary) Restart new applications If you  don’t have  a maintenance window, upgrade a slave and then switch Take slave offline so that apps point to master only Upgrade the slave Turn on replication to slave so that it catches up Switch the master to the upgraded slave; take old master offline Restart applications with new code Upgrade old master and bring back online TIP:  Test all upgrades in a pre-prod environment
SaaS Problems and Tungsten Solutions MySQL 5.0/5.1 Open source databases Cctrl switch operation and offline/online commands System maintenance Upgrades via replication; slave upgrade Application upgrades Automated and manual failover; live replicas; recovery procedures Handling failures Backups; live replicas; consistency checks Protecting tenant data from loss or corruption Tenant-based load balancing Performance scaling Simple installation; cctrl distributed commands Implementing easy-to-manage clusters “ Best-practices” database design Multi-tenant architecture Tungsten Features(s) Problem
Solution Roadmap for SaaS Applications Continuent is dedicated to making MySQL the foundation for SaaS businesses We will talk about these in our February 11 webinar “Secrets of Successful SaaS Data Architecture” Q2-3 Q2 Tenant management using shards Q2-3 Q2 Cross-site cluster management Q2-3 Q2 Multi-master replication Parallel replication SaaS Feature Q2-3 Q1 Prod Beta
Commercial Support for SaaS from Continuent
Tungsten Products Tungsten Enterprise offers subscription-licensed supported clustering for SaaS applications X Built-in Jump-Start consulting X Guaranteed bug fixes X 8x5, 24x7 support X Custom backup/restore X Virtual IP support X Automatic failover X X Manual failover X X SQL routing/proxying X X Advanced management tools Advanced MySQL replication Feature X X Enterprise Community
Continuent Services Practical consulting by industry experts with deep MySQL and SaaS industry background Structured Jump-Starts Hardware/OS setup, education, installation, production roll-out Solution architecture workshops Collaborative engagements to specify SaaS data management requirements, survey problems, and lay out options for solutions Proof-of-Concept implementations Fast design and implementation of specific cluster configurations
Tungsten Design Partner Program Continuent is developing advanced SaaS features in collaboration with leading SaaS vendors  We offer expertise not only in database clustering but operation of SaaS applications Partner with Continuent to “push the envelope” on scalable data management using open source databases Please contact us today to find out more about joining our efforts
Conclusion SaaS applications have a complex database problem that requires “big league” architecture  Continuent offers a complete solution for SaaS data management to raise overall profitability:  Raise SLAs by improving availability and performance Improve management efficiency Grow customers and product offerings through scalable database architecture Increase SaaS business profitability Contact us to try Tungsten now!
Contact Information EMEA and APAC Lars Sonckin kaari 16 02600 Espoo, Finland Tel +358 50 517 9059 Fax +358 9 863 0060  Continuent Web Site: http://www.continuent.com HQ and Americas 560 S. Winchester Blvd., Suite 500  San Jose, CA 95128  Tel  (866) 998-3642  Fax (408) 668-1009 e -mail:  [email_address]
Backup Slides
How Do I Manage SaaS Databases? Tungsten clusters consist of “data sources” You can view data source state using the ‘cctrl’ command $ tungsten-manager/bin/cctrl [LOGICAL] /cluster/demo/> ls COORDINATOR[centos5a:MANUAL] ROUTERS(centos5a:10999:ONLINE) DATASOURCES: centos5a(slave:ONLINE, progress=10, latency=0.443)REPLICATOR(role=slave, master=centos5b, state=ONLINE) centos5b(master:ONLINE, progress=10)REPLICATOR(role=master, state=ONLINE) Use ‘datasource’ and ‘replicator’ commands to manage database state
How Do I Recover Failed Databases? Recover procedures depend on what actually happened to your database To fix a failed slave database, just restart the database In automatic mode, rules take care of the rest To fix a failed master, reprovision it as a slave, then add it back to the cluster [LOGICAL] /cluster/demo/> set policy maintenance [LOGICAL] /cluster/demo/> datasource centos5a slave [LOGICAL] /cluster/demo/> replicator centos5b slave [LOGICAL] /cluster/demo/> datasource centos5a welcome [LOGICAL] /cluster/demo/> set policy automatic

More Related Content

PPTX
Running MariaDB in multiple data centers
PPT
Building a Scalable Architecture for web apps
PDF
Best Practice for Achieving High Availability in MariaDB
PPTX
Sql disaster recovery
PPTX
MariaDB High Availability
PDF
VMworld 2014: Virtualize Active Directory, the Right Way!
PPTX
Exchange 2013 Haute disponibilité et tolérance aux sinistres (Session 1/2 pre...
PPTX
Exchange Server 2013 : les mécanismes de haute disponibilité et la redondance...
Running MariaDB in multiple data centers
Building a Scalable Architecture for web apps
Best Practice for Achieving High Availability in MariaDB
Sql disaster recovery
MariaDB High Availability
VMworld 2014: Virtualize Active Directory, the Right Way!
Exchange 2013 Haute disponibilité et tolérance aux sinistres (Session 1/2 pre...
Exchange Server 2013 : les mécanismes de haute disponibilité et la redondance...

What's hot (20)

PPTX
3 migration
PDF
12 best practices for virtualizing active directory DCs
PDF
Adding Value in the Cloud with Performance Test
PPTX
LOAD BALANCING ALGORITHMS
PPT
XenApp Load Balancing
ODP
Nagios Conference 2012 - Andreas Ericsson - Merlin
PDF
Training Slides: Basics 102: Introduction to Tungsten Clustering
PDF
Expect the unexpected: Prepare for failures in microservices
PDF
Cloud computing Fundamentals - behind the hood of cloud platforms
PDF
Planning For Catastrophe with IBM WAS and IBM BPM
PDF
Architecting for the cloud cloud providers
PPTX
VMware Log Insight
PPTX
Fault tolerance
PPTX
Cloudify workshop at CCCEU 2014
PPTX
EDBT2015: Transactional Replication in Hybrid Data Store Architectures
PDF
VMworld 2013: Automated Management of Tier-1 Applications on VMware
PDF
02 2017 emea_roadshow_milan_ha
PDF
Architecting for the cloud elasticity security
PPTX
Nagios Conference 2012 - Jason Cook - Nagios and Mod-Gearman
PPTX
Compare Clustering Methods for MS SQL Server
3 migration
12 best practices for virtualizing active directory DCs
Adding Value in the Cloud with Performance Test
LOAD BALANCING ALGORITHMS
XenApp Load Balancing
Nagios Conference 2012 - Andreas Ericsson - Merlin
Training Slides: Basics 102: Introduction to Tungsten Clustering
Expect the unexpected: Prepare for failures in microservices
Cloud computing Fundamentals - behind the hood of cloud platforms
Planning For Catastrophe with IBM WAS and IBM BPM
Architecting for the cloud cloud providers
VMware Log Insight
Fault tolerance
Cloudify workshop at CCCEU 2014
EDBT2015: Transactional Replication in Hybrid Data Store Architectures
VMworld 2013: Automated Management of Tier-1 Applications on VMware
02 2017 emea_roadshow_milan_ha
Architecting for the cloud elasticity security
Nagios Conference 2012 - Jason Cook - Nagios and Mod-Gearman
Compare Clustering Methods for MS SQL Server
Ad

Viewers also liked (10)

PDF
Building simple and complex clusters with tungsten replicator
PDF
Tungsten University: Set Up And Manage Advanced Replication Topologies
PDF
Tungsten University: Geographically Distributed Multi-Master MySQL Clusters
PDF
Tungsten University: MySQL Multi-Master Operations Made Simple With Tungsten ...
PDF
Percona and Continuent present: Multi-Data Center MySQL with Continuent Tungsten
PDF
Setup & Operate Tungsten Replicator
PDF
Tungsten University: Replicate Between MySQL And Oracle
PDF
Real-Time Data Loading from MySQL to Hadoop with New Tungsten Replicator 3.0
PDF
Juggle your data with Tungsten Replicator
PDF
Tungsten Replicator tutorial
Building simple and complex clusters with tungsten replicator
Tungsten University: Set Up And Manage Advanced Replication Topologies
Tungsten University: Geographically Distributed Multi-Master MySQL Clusters
Tungsten University: MySQL Multi-Master Operations Made Simple With Tungsten ...
Percona and Continuent present: Multi-Data Center MySQL with Continuent Tungsten
Setup & Operate Tungsten Replicator
Tungsten University: Replicate Between MySQL And Oracle
Real-Time Data Loading from MySQL to Hadoop with New Tungsten Replicator 3.0
Juggle your data with Tungsten Replicator
Tungsten Replicator tutorial
Ad

Similar to Continuent Tungsten - Scalable Saa S Data Management (20)

PDF
Marketing Automation at Scale: How Marketo Solved Key Data Management Challen...
PDF
Webinar Slides: Multi-Master MySQL
PDF
Webinar Slides: Multi-Region AWS Aurora vs Continuent Tungsten for MySQL & Ma...
PDF
Webinar Slides: Real-Time Analytics from MySQL
PDF
Harnessing the Power of Master/Slave Clusters to Operate Data-Driven Business...
PDF
Webinar Slides: Geo-Distributed MySQL Clustering Done Right!
PDF
Training Slides: Intermediate 202: Performing Cluster Maintenance with Zero-D...
PDF
Webinar Slides: Geo-Scale MySQL in AWS
PDF
Building Tungsten Clusters with PostgreSQL Hot Standby and Streaming Replication
PDF
Living the Easy Life with Rules-Based Autonomic Database Clusters
PPTX
Is "Free" Good Enough for Your MySQL Environment?
PPTX
Webinar Slides: High Volume MySQL HA: SaaS Continuous Operations with Terabyt...
PDF
Training Slides: 101 - Basics: Tungsten Clustering - Under The Hood
PDF
Webinar Replay: How to Build a $10M SaaS Business Into a $6B Unicorn With MyS...
PDF
Webinar Slides: High Noon at AWS — Amazon RDS vs. Tungsten Clustering with My...
PDF
Webinar Slides: Global MySQL Availability: SaaS Cloud Contact Center Secures ...
PDF
Webinar Slides: No Data Loss MySQL: Guaranteed Credit Card Transaction Availa...
PDF
MySQL in the Cloud, is Amazon RDS for you?
PDF
MySQL High Availability and Disaster Recovery with Continuent, a VMware company
PDF
Implementing the Future of PostgreSQL Clustering with Tungsten
Marketing Automation at Scale: How Marketo Solved Key Data Management Challen...
Webinar Slides: Multi-Master MySQL
Webinar Slides: Multi-Region AWS Aurora vs Continuent Tungsten for MySQL & Ma...
Webinar Slides: Real-Time Analytics from MySQL
Harnessing the Power of Master/Slave Clusters to Operate Data-Driven Business...
Webinar Slides: Geo-Distributed MySQL Clustering Done Right!
Training Slides: Intermediate 202: Performing Cluster Maintenance with Zero-D...
Webinar Slides: Geo-Scale MySQL in AWS
Building Tungsten Clusters with PostgreSQL Hot Standby and Streaming Replication
Living the Easy Life with Rules-Based Autonomic Database Clusters
Is "Free" Good Enough for Your MySQL Environment?
Webinar Slides: High Volume MySQL HA: SaaS Continuous Operations with Terabyt...
Training Slides: 101 - Basics: Tungsten Clustering - Under The Hood
Webinar Replay: How to Build a $10M SaaS Business Into a $6B Unicorn With MyS...
Webinar Slides: High Noon at AWS — Amazon RDS vs. Tungsten Clustering with My...
Webinar Slides: Global MySQL Availability: SaaS Cloud Contact Center Secures ...
Webinar Slides: No Data Loss MySQL: Guaranteed Credit Card Transaction Availa...
MySQL in the Cloud, is Amazon RDS for you?
MySQL High Availability and Disaster Recovery with Continuent, a VMware company
Implementing the Future of PostgreSQL Clustering with Tungsten

Recently uploaded (20)

PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
KodekX | Application Modernization Development
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Empathic Computing: Creating Shared Understanding
PDF
Modernizing your data center with Dell and AMD
PDF
[발표본] 너의 과제는 클라우드에 있어_KTDS_김동현_20250524.pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Approach and Philosophy of On baking technology
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Electronic commerce courselecture one. Pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Machine learning based COVID-19 study performance prediction
PDF
cuic standard and advanced reporting.pdf
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPT
Teaching material agriculture food technology
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
NewMind AI Weekly Chronicles - August'25 Week I
Reach Out and Touch Someone: Haptics and Empathic Computing
KodekX | Application Modernization Development
Diabetes mellitus diagnosis method based random forest with bat algorithm
Empathic Computing: Creating Shared Understanding
Modernizing your data center with Dell and AMD
[발표본] 너의 과제는 클라우드에 있어_KTDS_김동현_20250524.pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Approach and Philosophy of On baking technology
NewMind AI Monthly Chronicles - July 2025
Chapter 3 Spatial Domain Image Processing.pdf
Electronic commerce courselecture one. Pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Machine learning based COVID-19 study performance prediction
cuic standard and advanced reporting.pdf
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Mobile App Security Testing_ A Comprehensive Guide.pdf
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Teaching material agriculture food technology
Dropbox Q2 2025 Financial Results & Investor Presentation
NewMind AI Weekly Chronicles - August'25 Week I

Continuent Tungsten - Scalable Saa S Data Management

  • 1. Scalable SaaS Data Management with Tungsten Robert Hodges CTO, Continuent, Inc.
  • 2. Agenda Introductions What’s So Hard about SaaS Data Management? Introducing Tungsten Clustering Implementing SaaS Data Management with Tungsten Commercial Support for SaaS from Continuent Definition: SaaS = “Software as a Service”
  • 3. About Continuent Our Business: Full service database management for SaaS applications Our Value: Ensure data are available when and where you need them TCO less than 20% of comparable solutions Our Technical Expertise Database replication Cluster management Application connectivity SaaS applications
  • 4. What’s So Hard about SaaS Data Management?
  • 5. The SaaS Business Problem Meet customer SLAs Keep applications available Don’t lose or confuse customer data Meet response time requirements Enable growth More customers More volume from existing customers New service offerings Raise bottom-line profitability Keep costs of operation as low as possible Enhance add-on revenue
  • 6. Successful SaaS Systems Are Complex SaaS databases quickly evolve into “big league” topologies Tenant Data Tenant Data Shared Data Tenant Apps Tenant Apps Shared Data Tenant Analytics Tenant Analytics Tenant and Shared Data
  • 7. Core Technical Issue: Multi-Tenancy Defining a flexible multi-tenant data architecture Implementing easy-to-manage clusters Scaling performance on shared databases Protecting tenant data from loss or corruption Handling failures efficiently Upgrades and maintenance windows And do it on economical open source databases!
  • 9. What Is Tungsten? Tungsten implements master/slave clusters to: Protect data Maintain high availability Improve resource utilization Raise performance Install and set up in a few minutes Integrated backup/restore and data integrity checks Rule-driven management with automated failover Simple procedures for updates and maintenance SQL scaling for multi-tenant systems
  • 10. What’s Inside Tungsten? Replication - Making copies Tungsten Replicator -- Database-neutral, platform independent master/slave replication Connectivity -- Finding databases Tungsten Connector -- Fast MySQL/PostgreSQL client to JDBC proxying Tungsten SQL Router --JDBC wrapper for high-performance and transparent failover, load-balancing, and partitioning (no proxy required) Management -- Administering the database Tungsten Manager -- Distributed administration with autonomic, rule-based configuration and no single point of failure Tungsten Monitor -- Track resource status and
  • 11. Tungsten Clustering In Action Master DB Slave DB Master Host Slave Host Replicator Manager/Monitor Replicator Manager/Monitor Application Server SQL Router/Connector Application Server SQL Router/Connector Management Client Management Client
  • 12. Distributed Rule-Based Management Broadcast commands and monitoring data Business Rules Manager #1 (Coordinator) Manager #3 Manager #2 Admin Client #1 Admin Client #3 Group Communications Admin Client #2 Local DBMS Resources Local DBMS Resources Local DBMS Resources
  • 13. Implementing SaaS Data Management with Tungsten
  • 14. Best-Practice Multi-Tenant Architecture Separate global and tenant data Global data are same for all customers Tenant data belong to individual customer Establish shards to hold tenants Bucket tenant data into databases, schemas, or groups of tables Define data services Global data service plus a set of tenant services is typical Master data in a single location for each service Services have one master and 1+N slaves for HA/scaling Add data services as you grow TIP: Use database as basic sharding unit
  • 15. Typical SaaS Architecture globalds1 tenantds1 tenantds4 tenantds4 tenantds2 Global tenant definitions and billing data Per tenant data (usually many tenants per service) globalds1 Master/slave pair for each service Implementation tenantds2 tenantds4 tenantds3 tenantds1
  • 16. Installing a Tungsten Cluster Four easy steps: Set up host prerequisites (MySQL, Ruby, Java) Download release from www.continuent.com and un-tar into local directory Run ‘configure’ script Ensure MySQL is correctly configured Configure cluster networking Configure replication and choose backup method Configure connectivity Perform customizations (e.g., Master VIP setup) Configure starts services automatically
  • 17. Advanced But Simple Management Tools ‘ cctrl’ is the Tungsten management client List data sources in the cluster [LOGICAL] /cluster/demo/> ls Check cluster liveness [LOGICAL] /cluster/demo/> cluster heartbeat Ensure that replication is synchronized [LOGICAL] /cluster/demo/> cluster flush Start and stop operating system services [LOGICAL] /cluster/demo/> service */mysql restart Get help [LOGICAL] /cluster/demo/> help
  • 18. Multiple Routes to Databases Java App Server Tungsten SQL Router PHP Application Tungsten Connector libmysqlclient.a Tungsten Cluster MySQL JDBC Driver Admin & Monitoring Admin & Monitoring Virtual IP Address
  • 19. Connecting Applications to Databases Tungsten SQL Router embeds in Java applications Requires Java library substitution Very high performance, seamless planned failover Tungsten Connector proxies any MySQL application Also very high performance with seamless planned failover No library changes Master Virtual IP maintained by Tungsten Failover is not seamless (broken connections) Completely transparent to applications Direct connection to database(s) Use whatever you want You are responsible for locating master/slaves yourself
  • 20. Scaling Reads on Slaves Tungsten “session-consistency” distributes tenant reads to slaves if caught up with last tenant write Works with tenants sharded by database or with independent database connections Master DB Slave DB SQL Router Record tenant write position Read if slave caught up with last tenant write
  • 21. A Short Digression on Backups MySQL Server DBMS Data Files Active Host Applications Backup HOT/COLD: mysqldump Backup HOT: LVM snapshot HOT: InnoDB Hot Backup COLD: File system copy
  • 22. Setting Up Backups Tungsten provides multiple backup methods Backups can run hot while DBMS is live or cold Logical backups use native DBMS utilities mysqldump, pg_dump, etc. Can run hot on slaves Slow to dump/load and in the case of MySQL may have bugs LVM (Logical Volume Manager) backups take a snapshot of the file system Very fast; run hot on slaves Tend to be large Snapshot maintenance affects write performance Script backups integrate arbitrary backup programs TIP: Configure backups and test them regularly
  • 23. Running Backups With Tungsten Hot backup using one-line command on slave [LOGICAL] > datasource centos5a backup lvm Cold backups run on off-line master or slave [LOGICAL] > datasource centos5b offline [LOGICAL] > replicator centos5b offline [LOGICAL] > datasource centos5b backup [LOGICAL] > replicator centos5b online Restore with one-line command [LOGICAL] > datasource centos5a restore TIP: Keep data services small enough to backup and restore easily!
  • 24. Verifying Tenant Data Copies Tungsten incremental checks verify data without stopping replication Implemented as replication events inside Tungsten Replicator Compute MD5 on all or part of tables Can do single tables or all tables in a database Run checks from manager in combination with flush command [LOGICAL] /cluster/demo/> cluster check tenant1.* [LOGICAL] /cluster/demo/> cluster flush Slaves can either fail or warn of failures TIP: Install consistency checks as a cron job TIP: Verify backups with restore + consistency check
  • 25. Handling Database Failures Automatic policy mode performs master failover automatically whenever: A database crashes A replicator fails or crashes A server reboots or drops off the network Manual policy mode lets you failover manually [LOGICAL] /cluster/demo/> failover Failover procedure promotes most advanced slave And points other slaves to the slave Recover command brings back failed master [LOGICAL] /cluster/demo/> datasource centos5a recover Slaves recover without admin intervention in automatic mode
  • 26. Performing Planned Maintenance Tungsten supports “daylight maintenance” To perform maintenance on a slave, just take it offline [LOGICAL] /cluster/demo/> set policy maintenance [LOGICAL] /cluster/demo/> datasource centos5b offline [LOGICAL] /cluster/demo/> replicator centos5b offline To perform maintenance on a master, first do a switch to promote a new master [LOGICAL] /cluster/demo/> switch Then perform maintenance using the slave procedure Switch the master back when you are done
  • 27. Upgrading Applications and Databases If you have a maintenance window, just upgrade the master and let replication take care of it Stop old applications and replace code Run upgrade script against master Flush and wait for slave to catch up (if necessary) Restart new applications If you don’t have a maintenance window, upgrade a slave and then switch Take slave offline so that apps point to master only Upgrade the slave Turn on replication to slave so that it catches up Switch the master to the upgraded slave; take old master offline Restart applications with new code Upgrade old master and bring back online TIP: Test all upgrades in a pre-prod environment
  • 28. SaaS Problems and Tungsten Solutions MySQL 5.0/5.1 Open source databases Cctrl switch operation and offline/online commands System maintenance Upgrades via replication; slave upgrade Application upgrades Automated and manual failover; live replicas; recovery procedures Handling failures Backups; live replicas; consistency checks Protecting tenant data from loss or corruption Tenant-based load balancing Performance scaling Simple installation; cctrl distributed commands Implementing easy-to-manage clusters “ Best-practices” database design Multi-tenant architecture Tungsten Features(s) Problem
  • 29. Solution Roadmap for SaaS Applications Continuent is dedicated to making MySQL the foundation for SaaS businesses We will talk about these in our February 11 webinar “Secrets of Successful SaaS Data Architecture” Q2-3 Q2 Tenant management using shards Q2-3 Q2 Cross-site cluster management Q2-3 Q2 Multi-master replication Parallel replication SaaS Feature Q2-3 Q1 Prod Beta
  • 30. Commercial Support for SaaS from Continuent
  • 31. Tungsten Products Tungsten Enterprise offers subscription-licensed supported clustering for SaaS applications X Built-in Jump-Start consulting X Guaranteed bug fixes X 8x5, 24x7 support X Custom backup/restore X Virtual IP support X Automatic failover X X Manual failover X X SQL routing/proxying X X Advanced management tools Advanced MySQL replication Feature X X Enterprise Community
  • 32. Continuent Services Practical consulting by industry experts with deep MySQL and SaaS industry background Structured Jump-Starts Hardware/OS setup, education, installation, production roll-out Solution architecture workshops Collaborative engagements to specify SaaS data management requirements, survey problems, and lay out options for solutions Proof-of-Concept implementations Fast design and implementation of specific cluster configurations
  • 33. Tungsten Design Partner Program Continuent is developing advanced SaaS features in collaboration with leading SaaS vendors We offer expertise not only in database clustering but operation of SaaS applications Partner with Continuent to “push the envelope” on scalable data management using open source databases Please contact us today to find out more about joining our efforts
  • 34. Conclusion SaaS applications have a complex database problem that requires “big league” architecture Continuent offers a complete solution for SaaS data management to raise overall profitability: Raise SLAs by improving availability and performance Improve management efficiency Grow customers and product offerings through scalable database architecture Increase SaaS business profitability Contact us to try Tungsten now!
  • 35. Contact Information EMEA and APAC Lars Sonckin kaari 16 02600 Espoo, Finland Tel +358 50 517 9059 Fax +358 9 863 0060 Continuent Web Site: http://www.continuent.com HQ and Americas 560 S. Winchester Blvd., Suite 500 San Jose, CA 95128 Tel (866) 998-3642 Fax (408) 668-1009 e -mail: [email_address]
  • 37. How Do I Manage SaaS Databases? Tungsten clusters consist of “data sources” You can view data source state using the ‘cctrl’ command $ tungsten-manager/bin/cctrl [LOGICAL] /cluster/demo/> ls COORDINATOR[centos5a:MANUAL] ROUTERS(centos5a:10999:ONLINE) DATASOURCES: centos5a(slave:ONLINE, progress=10, latency=0.443)REPLICATOR(role=slave, master=centos5b, state=ONLINE) centos5b(master:ONLINE, progress=10)REPLICATOR(role=master, state=ONLINE) Use ‘datasource’ and ‘replicator’ commands to manage database state
  • 38. How Do I Recover Failed Databases? Recover procedures depend on what actually happened to your database To fix a failed slave database, just restart the database In automatic mode, rules take care of the rest To fix a failed master, reprovision it as a slave, then add it back to the cluster [LOGICAL] /cluster/demo/> set policy maintenance [LOGICAL] /cluster/demo/> datasource centos5a slave [LOGICAL] /cluster/demo/> replicator centos5b slave [LOGICAL] /cluster/demo/> datasource centos5a welcome [LOGICAL] /cluster/demo/> set policy automatic

Editor's Notes

  • #2: Notes here.
  • #3: Todays session is very straightforward Bullets During todays session you may submit questions at any point during the presentation by using the Q&A box on the lower right of your webex screen. At the end of todays session we will address each question in the order they were received. Contact information is provided at the end of this presentation. For additional questions please feel free to contact us directly.
  • #36: How do I get an eval copy of the software Can you share any whitepapers on this technology? What is the price? Our dedicated server price is based upon CPU’s and the size of the cluster The monthly subscription starts at $125 list for a 2 node. Virtual Private Clusters are priced differently and I would be glad to discuss this off-line Is the entire database kept in memory? Can I make schema changes while the cluster is running How do you differ from Veritas Cluster Server?