SlideShare a Scribd company logo
1 of 34
Scaling your Database in the Cloud Fall 2010 Presented by: Cory Isaacson, CEO CodeFutures Corporation http://www.dbshards.com
Introduction Who I am Cory Isaacson, CEO of CodeFutures Providers of dbShards Author of Software Pipelines Partnerships: Rightscale The leading Cloud Management Platform myCloudWatcher Provider of cloud monitoring and management services Leaders in scalability, performance, high-availability and database solutions for the cloud… …based on real-world experience with dozens of cloud-based applications …social networking, gaming, data collection, mobile, analytics Objective is to provide useful experience you can apply to scaling (and managing) your database tier… …especially for high volume applications
Challenges of cloud computing Cloud provides highly attractive service environment Flexible, scales with need (up or down) No need for dedicated IT staff, fixed facility costs Pay-as-you-go model Cloud services occasionally fail Partial network outages Server failures… …by their nature cloud servers are “transient” Disk volume issues Cloud-based resources are constrained CPU I/O Rates… …the “Cloud I/O Barrier”
Typical Application Architecture
Scaling in the Cloud Scaling Load Balancers is easy Stateless routing to app server Can add redundant Load Balancers if needed DNS round-robin or intelligent routing for larger sites If one goes down… …failover to another Scaling Application Servers is easy Stateless Add or remove servers as need dictates If one goes down… …failover to another
Scaling in the Cloud Scaling the Database tier is hard “Stateful” by definition (and necessity…) Large, integrated data sets… 10s of GBs to TBs (or more…) Difficult to move, reload I/O dependent… …adversely affected by cloud service failures …and slow cloud I/O If one goes down… …ouch! Databases form the “last mile” of true application scalability Initially simple optimization produces the best result Implement a follow-on scalability strategy for long-term performance goals… …plus a high-availability strategy is a must
All CPUs wait at the same speed… The Cloud I/O Barrier
More Database scalability challenges Databases have many other challenges that limit scalability ACID compliance… …especially Consistency …user contention Operational challenges Failover Planned, unplanned Maintenance Index rebuild Restore Space reclamation Lifecycle Reliable Backup/Restore Monitoring Application Updates Management
Database slowdown is not linear…
Challenges apply to all types of databases Traditional RDBMS (MySQL, Postgres, Oracle…) I/O bound Multi-user, lock contention High-availability Lifecycle management In-memory Databases (NoSQL, Caching, Specialty…) Reliability Limits of a single server …and a single thread Data dumps to disk High-availability Lifecycle Management No matter what the technology, big databases are hard to manage… …elastic scaling is a real challenge …degradation from growth in size and volume is a certainty Application-specific database requirements add to the challenge …database design is key… …balance performance vs. convenience vs. data size
The Laws of Databases Law #1: Small Databases are fast… Law #2: Big Databases are slow… Law #3: Keep databases small
What is the answer? Database sharding is the only effective method for achieving scale, elasticity, reliability and easy management… …regardless of your database technology
What is Database Sharding? “Horizontal partitioning is a database design principle whereby rows of a database table are held separately... Each partition forms part of a shard, which may in turn be located on a separate database server or physical location.” Wikipedia
The key to Database Sharding…
Database Sharding Architecture
Database Sharding Architecture
Database Sharding… the results
Why does Database Sharding work? Maximize CPU/Memory per database instance… …as compared to database size No contention between servers Locking, disk, memory, CPU Allows for intelligent parallel processing… …Go Fish queries across shards Keep CPUs busy and productive
Breaking the Cloud I/O Barrier
Database types Traditional RDBMS Proven SQL language… …although ORM can change that Durable, transactional, dependable… …but inflexible NoSQL Typically in-memory… …the real speed advantage Various flavors… Key/Value Store Document database Hybrid
Black box vs. Application-Aware Sharding Both utilize sharding on a data key… …typically modulus on a value or consistent hash Black box sharding is automatic…  …attempts to evenly shard across all available servers …no developer visibility or control …can work acceptably for simple, non-indexed NoSQL data stores …easily supports single-row/object results Application-Aware sharding is defined by the developer… …selective sharding of large data …explicit developer control and visibility …tunable as the database grows and matures …more efficient for result sets and searchable queries
How Database Sharding works for NoSQL
How Database Sharding works for SQL Primary Shard Table Shard Child Tables Global Tables
How Database Sharding works for SQL
What about Cross-Shard result sets?
More on Cross-Shard result sets… Black Box approach requires “scatter gather” for multi-row/object result set… …common with NoSQL engines …forces use of denormalized lists …must be maintained by developer/application code …Map Reduce processing helps with this (non-realtime) Application-Aware provides access to meaningful result sets of related data… …aggregation, sort easier to perform …logical search operations more natural
What about High-Availability? Can you afford to take your databases offline: …for scheduled maintenance?  …for unplanned failure?  …can you accept some lost transactions? By definition Database Sharding adds failure points to the data tier A proven High-Availability strategy is a must… …system outages…especially in the cloud …planned maintenance…a necessity for all database engines
Traditional asynch replication is inadequate… ,[object Object]
No rapid failover for continuous operation
Maintenance difficult in production environments
Used by many NoSQL engines,[object Object]
…3 active-active instances for in-memory databases
Support for…
…fail-down

More Related Content

More from RightScale

Comparing Cloud VM Types and Prices: AWS vs Azure vs Google vs IBM
Comparing Cloud VM Types and Prices: AWS vs Azure vs Google vs IBMComparing Cloud VM Types and Prices: AWS vs Azure vs Google vs IBM
Comparing Cloud VM Types and Prices: AWS vs Azure vs Google vs IBMRightScale
 
How to Allocate and Report Cloud Costs with RightScale Optima
How to Allocate and Report Cloud Costs with RightScale OptimaHow to Allocate and Report Cloud Costs with RightScale Optima
How to Allocate and Report Cloud Costs with RightScale OptimaRightScale
 
Should You Move Between AWS, Azure, or Google Clouds? Considerations, Pros an...
Should You Move Between AWS, Azure, or Google Clouds? Considerations, Pros an...Should You Move Between AWS, Azure, or Google Clouds? Considerations, Pros an...
Should You Move Between AWS, Azure, or Google Clouds? Considerations, Pros an...RightScale
 
Using RightScale CMP with Cloud Provider Tools
Using RightScale CMP with Cloud Provider ToolsUsing RightScale CMP with Cloud Provider Tools
Using RightScale CMP with Cloud Provider ToolsRightScale
 
Best Practices for Multi-Cloud Security and Compliance
Best Practices for Multi-Cloud Security and ComplianceBest Practices for Multi-Cloud Security and Compliance
Best Practices for Multi-Cloud Security and ComplianceRightScale
 
Automating Multi-Cloud Policies for AWS, Azure, Google, and More
Automating Multi-Cloud Policies for AWS, Azure, Google, and MoreAutomating Multi-Cloud Policies for AWS, Azure, Google, and More
Automating Multi-Cloud Policies for AWS, Azure, Google, and MoreRightScale
 
The 5 Stages of Cloud Management for Enterprises
The 5 Stages of Cloud Management for EnterprisesThe 5 Stages of Cloud Management for Enterprises
The 5 Stages of Cloud Management for EnterprisesRightScale
 
9 Ways to Reduce Cloud Storage Costs
9 Ways to Reduce Cloud Storage Costs9 Ways to Reduce Cloud Storage Costs
9 Ways to Reduce Cloud Storage CostsRightScale
 
Serverless Comparison: AWS vs Azure vs Google vs IBM
Serverless Comparison: AWS vs Azure vs Google vs IBMServerless Comparison: AWS vs Azure vs Google vs IBM
Serverless Comparison: AWS vs Azure vs Google vs IBMRightScale
 
Best Practices for Cloud Managed Services Providers: The Path to CMP Success
Best Practices for Cloud Managed Services Providers: The Path to CMP SuccessBest Practices for Cloud Managed Services Providers: The Path to CMP Success
Best Practices for Cloud Managed Services Providers: The Path to CMP SuccessRightScale
 
Cloud Storage Comparison: AWS vs Azure vs Google vs IBM
Cloud Storage Comparison: AWS vs Azure vs Google vs IBMCloud Storage Comparison: AWS vs Azure vs Google vs IBM
Cloud Storage Comparison: AWS vs Azure vs Google vs IBMRightScale
 
2018 Cloud Trends: RightScale State of the Cloud Report
2018 Cloud Trends: RightScale State of the Cloud Report2018 Cloud Trends: RightScale State of the Cloud Report
2018 Cloud Trends: RightScale State of the Cloud ReportRightScale
 
Got a Multi-Cloud Strategy? How RightScale CMP Helps
Got a Multi-Cloud Strategy? How RightScale CMP HelpsGot a Multi-Cloud Strategy? How RightScale CMP Helps
Got a Multi-Cloud Strategy? How RightScale CMP HelpsRightScale
 
How to Manage Cloud Costs with RightScale Optima
How to Manage Cloud Costs with RightScale OptimaHow to Manage Cloud Costs with RightScale Optima
How to Manage Cloud Costs with RightScale OptimaRightScale
 
Top 10 Cloud Trends for 2018 and Actions You Can Take Now
Top 10 Cloud Trends for 2018 and Actions You Can Take NowTop 10 Cloud Trends for 2018 and Actions You Can Take Now
Top 10 Cloud Trends for 2018 and Actions You Can Take NowRightScale
 
AWS re:Invent 2017 Recap
AWS re:Invent 2017 RecapAWS re:Invent 2017 Recap
AWS re:Invent 2017 RecapRightScale
 
Cloud Instances Price Comparison: AWS vs Azure vs Google vs IBM
Cloud Instances Price Comparison: AWS vs Azure vs Google vs IBMCloud Instances Price Comparison: AWS vs Azure vs Google vs IBM
Cloud Instances Price Comparison: AWS vs Azure vs Google vs IBMRightScale
 
Enterprise Cloud Strategy: 7 Areas You Need to Re-Think
Enterprise Cloud Strategy: 7 Areas You Need to Re-ThinkEnterprise Cloud Strategy: 7 Areas You Need to Re-Think
Enterprise Cloud Strategy: 7 Areas You Need to Re-ThinkRightScale
 
How MSPs Can Be Successful in AWS, Azure, and Google Clouds
How MSPs Can Be Successful in AWS, Azure, and Google CloudsHow MSPs Can Be Successful in AWS, Azure, and Google Clouds
How MSPs Can Be Successful in AWS, Azure, and Google CloudsRightScale
 
Orchestrating PaaS and IaaS+ with RightScale
Orchestrating PaaS and IaaS+ with RightScaleOrchestrating PaaS and IaaS+ with RightScale
Orchestrating PaaS and IaaS+ with RightScaleRightScale
 

More from RightScale (20)

Comparing Cloud VM Types and Prices: AWS vs Azure vs Google vs IBM
Comparing Cloud VM Types and Prices: AWS vs Azure vs Google vs IBMComparing Cloud VM Types and Prices: AWS vs Azure vs Google vs IBM
Comparing Cloud VM Types and Prices: AWS vs Azure vs Google vs IBM
 
How to Allocate and Report Cloud Costs with RightScale Optima
How to Allocate and Report Cloud Costs with RightScale OptimaHow to Allocate and Report Cloud Costs with RightScale Optima
How to Allocate and Report Cloud Costs with RightScale Optima
 
Should You Move Between AWS, Azure, or Google Clouds? Considerations, Pros an...
Should You Move Between AWS, Azure, or Google Clouds? Considerations, Pros an...Should You Move Between AWS, Azure, or Google Clouds? Considerations, Pros an...
Should You Move Between AWS, Azure, or Google Clouds? Considerations, Pros an...
 
Using RightScale CMP with Cloud Provider Tools
Using RightScale CMP with Cloud Provider ToolsUsing RightScale CMP with Cloud Provider Tools
Using RightScale CMP with Cloud Provider Tools
 
Best Practices for Multi-Cloud Security and Compliance
Best Practices for Multi-Cloud Security and ComplianceBest Practices for Multi-Cloud Security and Compliance
Best Practices for Multi-Cloud Security and Compliance
 
Automating Multi-Cloud Policies for AWS, Azure, Google, and More
Automating Multi-Cloud Policies for AWS, Azure, Google, and MoreAutomating Multi-Cloud Policies for AWS, Azure, Google, and More
Automating Multi-Cloud Policies for AWS, Azure, Google, and More
 
The 5 Stages of Cloud Management for Enterprises
The 5 Stages of Cloud Management for EnterprisesThe 5 Stages of Cloud Management for Enterprises
The 5 Stages of Cloud Management for Enterprises
 
9 Ways to Reduce Cloud Storage Costs
9 Ways to Reduce Cloud Storage Costs9 Ways to Reduce Cloud Storage Costs
9 Ways to Reduce Cloud Storage Costs
 
Serverless Comparison: AWS vs Azure vs Google vs IBM
Serverless Comparison: AWS vs Azure vs Google vs IBMServerless Comparison: AWS vs Azure vs Google vs IBM
Serverless Comparison: AWS vs Azure vs Google vs IBM
 
Best Practices for Cloud Managed Services Providers: The Path to CMP Success
Best Practices for Cloud Managed Services Providers: The Path to CMP SuccessBest Practices for Cloud Managed Services Providers: The Path to CMP Success
Best Practices for Cloud Managed Services Providers: The Path to CMP Success
 
Cloud Storage Comparison: AWS vs Azure vs Google vs IBM
Cloud Storage Comparison: AWS vs Azure vs Google vs IBMCloud Storage Comparison: AWS vs Azure vs Google vs IBM
Cloud Storage Comparison: AWS vs Azure vs Google vs IBM
 
2018 Cloud Trends: RightScale State of the Cloud Report
2018 Cloud Trends: RightScale State of the Cloud Report2018 Cloud Trends: RightScale State of the Cloud Report
2018 Cloud Trends: RightScale State of the Cloud Report
 
Got a Multi-Cloud Strategy? How RightScale CMP Helps
Got a Multi-Cloud Strategy? How RightScale CMP HelpsGot a Multi-Cloud Strategy? How RightScale CMP Helps
Got a Multi-Cloud Strategy? How RightScale CMP Helps
 
How to Manage Cloud Costs with RightScale Optima
How to Manage Cloud Costs with RightScale OptimaHow to Manage Cloud Costs with RightScale Optima
How to Manage Cloud Costs with RightScale Optima
 
Top 10 Cloud Trends for 2018 and Actions You Can Take Now
Top 10 Cloud Trends for 2018 and Actions You Can Take NowTop 10 Cloud Trends for 2018 and Actions You Can Take Now
Top 10 Cloud Trends for 2018 and Actions You Can Take Now
 
AWS re:Invent 2017 Recap
AWS re:Invent 2017 RecapAWS re:Invent 2017 Recap
AWS re:Invent 2017 Recap
 
Cloud Instances Price Comparison: AWS vs Azure vs Google vs IBM
Cloud Instances Price Comparison: AWS vs Azure vs Google vs IBMCloud Instances Price Comparison: AWS vs Azure vs Google vs IBM
Cloud Instances Price Comparison: AWS vs Azure vs Google vs IBM
 
Enterprise Cloud Strategy: 7 Areas You Need to Re-Think
Enterprise Cloud Strategy: 7 Areas You Need to Re-ThinkEnterprise Cloud Strategy: 7 Areas You Need to Re-Think
Enterprise Cloud Strategy: 7 Areas You Need to Re-Think
 
How MSPs Can Be Successful in AWS, Azure, and Google Clouds
How MSPs Can Be Successful in AWS, Azure, and Google CloudsHow MSPs Can Be Successful in AWS, Azure, and Google Clouds
How MSPs Can Be Successful in AWS, Azure, and Google Clouds
 
Orchestrating PaaS and IaaS+ with RightScale
Orchestrating PaaS and IaaS+ with RightScaleOrchestrating PaaS and IaaS+ with RightScale
Orchestrating PaaS and IaaS+ with RightScale
 

Recently uploaded

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 

Recently uploaded (20)

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 

Scaling SQL and NoSQL Databases in the Cloud

  • 1. Scaling your Database in the Cloud Fall 2010 Presented by: Cory Isaacson, CEO CodeFutures Corporation http://www.dbshards.com
  • 2. Introduction Who I am Cory Isaacson, CEO of CodeFutures Providers of dbShards Author of Software Pipelines Partnerships: Rightscale The leading Cloud Management Platform myCloudWatcher Provider of cloud monitoring and management services Leaders in scalability, performance, high-availability and database solutions for the cloud… …based on real-world experience with dozens of cloud-based applications …social networking, gaming, data collection, mobile, analytics Objective is to provide useful experience you can apply to scaling (and managing) your database tier… …especially for high volume applications
  • 3. Challenges of cloud computing Cloud provides highly attractive service environment Flexible, scales with need (up or down) No need for dedicated IT staff, fixed facility costs Pay-as-you-go model Cloud services occasionally fail Partial network outages Server failures… …by their nature cloud servers are “transient” Disk volume issues Cloud-based resources are constrained CPU I/O Rates… …the “Cloud I/O Barrier”
  • 5. Scaling in the Cloud Scaling Load Balancers is easy Stateless routing to app server Can add redundant Load Balancers if needed DNS round-robin or intelligent routing for larger sites If one goes down… …failover to another Scaling Application Servers is easy Stateless Add or remove servers as need dictates If one goes down… …failover to another
  • 6. Scaling in the Cloud Scaling the Database tier is hard “Stateful” by definition (and necessity…) Large, integrated data sets… 10s of GBs to TBs (or more…) Difficult to move, reload I/O dependent… …adversely affected by cloud service failures …and slow cloud I/O If one goes down… …ouch! Databases form the “last mile” of true application scalability Initially simple optimization produces the best result Implement a follow-on scalability strategy for long-term performance goals… …plus a high-availability strategy is a must
  • 7. All CPUs wait at the same speed… The Cloud I/O Barrier
  • 8. More Database scalability challenges Databases have many other challenges that limit scalability ACID compliance… …especially Consistency …user contention Operational challenges Failover Planned, unplanned Maintenance Index rebuild Restore Space reclamation Lifecycle Reliable Backup/Restore Monitoring Application Updates Management
  • 9. Database slowdown is not linear…
  • 10. Challenges apply to all types of databases Traditional RDBMS (MySQL, Postgres, Oracle…) I/O bound Multi-user, lock contention High-availability Lifecycle management In-memory Databases (NoSQL, Caching, Specialty…) Reliability Limits of a single server …and a single thread Data dumps to disk High-availability Lifecycle Management No matter what the technology, big databases are hard to manage… …elastic scaling is a real challenge …degradation from growth in size and volume is a certainty Application-specific database requirements add to the challenge …database design is key… …balance performance vs. convenience vs. data size
  • 11. The Laws of Databases Law #1: Small Databases are fast… Law #2: Big Databases are slow… Law #3: Keep databases small
  • 12. What is the answer? Database sharding is the only effective method for achieving scale, elasticity, reliability and easy management… …regardless of your database technology
  • 13. What is Database Sharding? “Horizontal partitioning is a database design principle whereby rows of a database table are held separately... Each partition forms part of a shard, which may in turn be located on a separate database server or physical location.” Wikipedia
  • 14. The key to Database Sharding…
  • 18. Why does Database Sharding work? Maximize CPU/Memory per database instance… …as compared to database size No contention between servers Locking, disk, memory, CPU Allows for intelligent parallel processing… …Go Fish queries across shards Keep CPUs busy and productive
  • 19. Breaking the Cloud I/O Barrier
  • 20. Database types Traditional RDBMS Proven SQL language… …although ORM can change that Durable, transactional, dependable… …but inflexible NoSQL Typically in-memory… …the real speed advantage Various flavors… Key/Value Store Document database Hybrid
  • 21. Black box vs. Application-Aware Sharding Both utilize sharding on a data key… …typically modulus on a value or consistent hash Black box sharding is automatic… …attempts to evenly shard across all available servers …no developer visibility or control …can work acceptably for simple, non-indexed NoSQL data stores …easily supports single-row/object results Application-Aware sharding is defined by the developer… …selective sharding of large data …explicit developer control and visibility …tunable as the database grows and matures …more efficient for result sets and searchable queries
  • 22. How Database Sharding works for NoSQL
  • 23. How Database Sharding works for SQL Primary Shard Table Shard Child Tables Global Tables
  • 24. How Database Sharding works for SQL
  • 25. What about Cross-Shard result sets?
  • 26. More on Cross-Shard result sets… Black Box approach requires “scatter gather” for multi-row/object result set… …common with NoSQL engines …forces use of denormalized lists …must be maintained by developer/application code …Map Reduce processing helps with this (non-realtime) Application-Aware provides access to meaningful result sets of related data… …aggregation, sort easier to perform …logical search operations more natural
  • 27. What about High-Availability? Can you afford to take your databases offline: …for scheduled maintenance? …for unplanned failure? …can you accept some lost transactions? By definition Database Sharding adds failure points to the data tier A proven High-Availability strategy is a must… …system outages…especially in the cloud …planned maintenance…a necessity for all database engines
  • 28.
  • 29. No rapid failover for continuous operation
  • 30. Maintenance difficult in production environments
  • 31.
  • 32. …3 active-active instances for in-memory databases
  • 38.
  • 39. Database Sharding…elastic shards Expand the number of shards… …divide a single shard into N new shards Contract the number of shards… …consolidate N shards into a single shard Due to large data sizes, this takes time… …regardless of data architecture Requires High-Availability to ensure no downtime… …perform scaling on live replica
  • 40. Database Sharding…the future Ability to leverage proven database engines… …SQL …NoSQL …Caching Allow developers to select the best database engine for a given set of application requirements… …seamless context-switching within the application …use the API of choice Improved management… …monitoring …configuration “on-the-fly” …dynamic elastic shards based on demand
  • 41. Database Sharding summary Database Sharding is the most effective tool for scaling your database tier in the cloud… …or anywhere Use Database Sharding for any type of engine… …SQL …NoSQL …Cache Use the best engine for a given application requirement… …avoid the “one-size-fits-all” trap …each engine has its strengths to capitalize on Ensure your High-Availability is proven and bulletproof… …especially critical on the cloud …must support failure and maintenance
  • 42. Questions/Answers Cory Isaacson CodeFutures Corporation cory.isaacson@codefutures.com http://www.dbshards.com

Editor's Notes

  1. Writes are linear, reads can be faster – depending on your database architecture.
  2. How did your database perform 6 months or a year ago?
  3. NoSQL is attractive due to simple API, ease of use. But beware, you really need a solid data design for exactly what you want to do. Relationships are not handled by the database, they are handled by the developer.
  4. Difference between Black box sharding/NoSQL and App Aware sharding with an RDBMS – you can get sets of related data from the same shard, otherwise need to retrieve a row at a time and consolidate