database scalability patterns
play

Database Scalability {Patterns} / Robert Treat robert treat - PowerPoint PPT Presentation

Database Scalability {Patterns} / Robert Treat robert treat omniti postgres oracle - mysql mssql - sqlite - nosql What are Database Scalability Patterns? Part Design Patterns Part Application Life-Cycle Part Design Patterns Part


  1. Database Scalability {Patterns} / Robert Treat

  2. robert treat omniti postgres oracle - mysql mssql - sqlite - nosql

  3. What are “Database Scalability Patterns?”

  4. Part Design Patterns Part Application Life-Cycle

  5. Part Design Patterns Part Application Life-Cycle

  6. Part Design Patterns Part Application Life-Cycle

  7. Part Design Patterns Part Application Life-Cycle

  8. MyFirstDatabase

  9. Vertical Partitioning

  10. Vertical Scaling

  11. Vertical Scaling

  12. Vertical Scaling

  13. Federated Data Storage Horizontal Partitioning “sharding” Read Slaves Multi-Master Horizontal Scaling

  14. Read Slaves / Master - Slave Scale Read Load

  15. Read Slaves / Master - Slave Scale Read Load writes go here!

  16. Read Slaves / Master - Slave Scale Read Load writes go here! reads go here (or here) (or here)

  17. Read Slaves / Master - Slave Scale Read Load database writes writes go here! data to slaves slave db slave db slave db reads go here (or here) (or here)

  18. Read Slaves / Master - Slave Scale Read Load app writes data writes go here! everywhere memcached memcached memcached reads go here (or here) (or here)

  19. Read Slaves / Master - Slave Scale Read Load • Typically • Full Copy of Data On Each Node • Asynchronous

  20. Read Slaves / Master - Slave Scale Read Load • Typically • Consider • Full Copy of Data • Partial Copy • Synchronous On Each Node • Asynchronous • Don’t use a RDBMS?

  21. Read Slaves / Master - Slave Scale Read Load • Typically • Consider • Full Copy of Data • Partial Copy • Synchronous On Each Node • Asynchronous • Don’t use a RDBMS? Requires Application Changes “easy”

  22. Scaling Writes “not easy”

  23. Multi-Master many different ways to implement this, few that actually work in production

  24. Multi-Master many different ways to implement this, few that actually work in production write to any node, database syncs data

  25. Multi-Master many different ways to implement this, few that actually work in production write to any node, database syncs data can reduce cpu, doesn’t reduce i/o

  26. Multi-Master many different ways to implement this, few that actually work in production write to any node, database syncs data can reduce cpu, doesn’t reduce i/o failover solution not a scalability solution

  27. Horizontal Partitioning “sharding” “SOA”

  28. Horizontal Partitioning “sharding” “SOA”

  29. Horizontal Partitioning • Divide schema by job operations • Move each piece to own server • Duplicate some data as needed

  30. Horizontal Partitioning items • Divide schema by job operations • Move each piece to own server • Duplicate some data as needed forums users

  31. Horizontal Partitioning items • Divide schema by job operations • Move each piece to own server • Duplicate some data as needed forums • You must separate dependencies in the app code first! users

  32. Horizontal Partitioning items • Divide schema by job operations • Move each piece to own server • Duplicate some data as needed forums • You must separate dependencies in the app code first! users Each node is a new instance of vertical scaling

  33. Horizontal Scaling • data split across servers based on algorithm • data dropped into buckets (multiple?) app magic hash algorithm

  34. Horizontal Scaling • data split across servers based on algorithm • data dropped into buckets (multiple?) app magic hash algorithm

  35. Horizontal Scaling • data split across servers based on algorithm • data dropped into buckets (multiple?) • someone must keep track of data, and provide lookup services app magic hash algorithm

  36. Universal Truths of Scaling Databases Vertical Scalability is Helpful for Every Pattern Even in a horizontally scaled, fully distributed database, the number of nodes needed is affected by vertical scalability

  37. Universal Truths of Scaling Databases New Nodes Are Never Free • Add points of failure • Add management costs • Add complexity to architecture • Add complexity to your app code

  38. MyFirstDB V Vertical Partitioning V Vertical Scaling V Read Slaves V Horizontal Partitioning

  39. tips plan for layered data sources read / write connections in code use schemas to separate services

  40. THANKS! more: xzilla.net @robtreat2 omniti.com/surge (scalability conference)

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend