SlideShare a Scribd company logo
1 of 29
Download to read offline
THE MYSPACE DATA ARCHITECTURE:
SCALING FOR RAPID AND SUSTAINABLE GROWTH

            SPEAKER: CHRISTA STELZMULLER
            MYSPACE CHIEF DATA ARCHITECT


 SILICON VALLEY SQL SERVER USER GROUP               JUNE 2009
         MARK GINNEBAUGH, USER GROUP LEADER




     http://www.meetup.com/The-SiliconValley-SQL-Server-User-Group/
Christa Stelzmuller

  Chief Data Architect at MySpace since Oct 2006
  Formerly at Yahoo!
    Engineering Manager
    Data Architect for the Yahoo! Music Team
  Specializes in very large databases with high volumes
  of transactions

Tonight’s Topic: The MySpace Data Architecture: Scaling for
Rapid and Sustainable Growth
Data Services Organization

 Operations
   Storage
   Database
 Development
   Database
   Search
   ETL & Infrastructure
   Warehousing
   Mining
High Level Architecture
Scaling the Database Tier

Scale out, not up
  Functional separation
  Horizontal partitioning within functions
Design Principles
  Decoupled and isolated
  Flexibility and predictability in scaling according to
  usage
  Distributed transaction load
  Improved administration
Functional Separation
Logical Segments
  Profiles
    Core user generated data
    User relationships to features
  Mail
    User-to-user communication data
  Features
    Content specific or feature specific, not user specific
  Search & Browse
    Read only
    Redundant denormalized stores
Functional Separation
 Infrastructure Segments
   Security
     Signup & Login
     Spam fighting
   Shared
     Globally queryable core user data
   SSIS & Dispatcher
     Database-to-database communication (ETL)
     Messaging based (dispatcher)
     Package based (SSIS)
   Distribution
     Replication
Horizontal Partitioning

Inter-database Partitioning Approaches
  Divide by primary access pattern (key based)
    Range based schemes
    Modulo based schemes
  Write Master/Read Slave
    Dedicated write master with replicated read slaves
    Dedicated write master with non-replicated slaves
    Disparate masters with non-replicated slaves
Intra-database Partitioning Approaches
  Vertical table partitioning
  More horizontal table partitioning!
How distributed are we?
Logical Segments
  Profiles: 487 databases and growing 1 every 3 days
  Mail: 487 databases and growing 1 every 3 days
  Search & Browse: 24 databases and stable
  Features: 88 databases and growing 2 every month
Infrastructure Segments
  Security: 6 databases and stable
  Shared: 8 databases and stable
  SSIS & Dispatcher: 30 databases and stable
  Distribution: 5 databases and stable
Challenges with Scaling Out

 Data Integrity
   Service Broker/Dispatcher
   Tier Hopper
 Read/Write Volatility
   Prepopulator
   Transaction Manager
   Targeted Persistent Cache Implementations
 Administering all those servers
   Self-tuning intelligent systems
Service Dispatcher

Service Broker
  Enabled asynchronous transactions intra- and inter-database
  Only allows for unicast messaging, requiring a physical route
  between each service and database
Solution was to extend SB’s functionality
  Centralizes route management from individual databases by
  utilizing custom gateways
  Enables multicast messaging
  Abstracts complex SB components for rapid development
Service Dispatcher
Tier Hopper

Problem
  Database initiated changes needed to be synchronized with
  cache
  Database initiated events needed to be exchanged with
  non-DB systems
Solution was to build a service to meet these needs
  Service Broker, SQL-CLR, and Windows Service
  Completely asynchronous
  Currently centralized
Tier Hopper
Prepopulator
 Problem
   Web server brokered updates of cache from the databases
   put unnecessary pressure on databases for relatively static
   objects
   Multi-directional data flows are subject to race conditions
   which put extra pressure on the database to resolve
 Solution was to build a “pump” to feed cache
   Decoupled, pull-based
   Expensive transformation business logic is hosted here
   instead of the databases
   Manages complex joining of data to build objects
Transaction Manager
 Problem
   Web server initiated writes had no resiliency to outages
   No atomicity of transactions that crossed different
   databases or disparate data stores
 Solution was to move write handling from web servers
 to a different tier
   Asynchronous, persistent queue backed writes
   Supports DR multi-data center scenarios
   Supports writes to multiple storage platforms
   Supports business logic work items for extending logic within
   the transaction
Evolution of Reads/Writes

                        Volatile, Less Resilient




Persistent, Resilient
Self-
Self-tuning Systems

History of Major Problems
  CPU spikes
  Excessive IO consumption
Causes
  Fragmentation
  Outdated statistics
Solution was to create a process that addressed
fragmentation and statistics in a controlled fashion
Self-
Self-tuning Systems

Data collection
  Every fifteen minutes performance data is captured from all
  the servers and aggregated in a data warehouse
  Baselines are established for each farm and for each server
Auto-Response
  Top ten worst offenders
  Fix CPU
Self-
Self-tuning Systems

Index defragmentation
  Nightly reorganizing or reindexing of fragmented objects
  Intelligent and limited updates based on object analysis
Statistics Updates
  Nightly updates of statistics based on a row modification of
  15%
  Prioritizes most modified first
  Includes internal system tables
  Recompiles dependent procedures
Database Ecosystem
Other Challenges

Managing Growth
  Data growth (datafile vs. database)
  Transaction Log
Balancing IO
  SAN hot spots
  Evenly distribute reads and writes
Backups & Disaster Recovery

Multi-Tier Backups
  Daily snaps on production Inservs, retention 3 days
  Remote Copy between Production & Near Line
  Production data replicated to Near Line Inservs daily
  Daily snaps on Near Line Inservs, retention 5 days
  Snap Verify
Multi-Tier DR
  Hot - transactions replicated
  Warm - block level replication
  Cold - Snaps
Database & Storage Stats

               Volume, Server, DB Stats
            Total Volumes                2989
            Total Servers                669
           Total Databases               1512
         Total Database Files           17715
                               Production       Near Line
       Total Space (TB)         2331.94          1745.64
    Total Used Space (TB)        1333.3          904.99
    Total Free Space (TB)        998.66          839.28

                               Production       Near Line
         Total Disks             15120            2560
Database & Storage Stats

                  Average               Average
 MySpace DB   Connections/Server   Requests/sec/Server
Profile             6,800                1,100
Mail                4,400                  775
Shared              2,000                1,600
Features             800                   400
Security            4,800                3,700
Search               300                   500
Browse                80                   500
Dispatcher             6                  1200
Database & Storage Stats

6 GB/s data transfer rate
70% Writes and 30% Reads
600,000 to 750,000 IOps across all frames
170 Mb/s data replication over IP from production to
backup (40-45 TB sync per day)
10 Brocade 48k Director switches with 256 Ports per
switch (2560 total ports)
8 Brocade 7500 FCIP switches with 16 ports per switch
(128 total ports and 16 1GE ports)
Upcoming Meetings
Silicon Valley SQL Server User Group

July 21, 2009
  Peter Myers Solid Quality Mentors
    Taking Your Application Design to the
    Next Level with Data Mining
                                            www.bayareasql.org

August 18, 2009
  Elizabeth Diamond, DesignMind
    Architecting a Data Warehouse: A Case Study
Join our LinkedIn Group

Name of Group: Silicon Valley SQL Server User Group

Purpose:
  Networking
  SQL Server News and discussions
  Meeting announcements /availability of slide decks
  Job posts and search

Join here:
  http://www.linkedin.com/groupInvitation?gid=1774133&sharedKey=6697B472F26D
To learn more or inquire about speaking opportunities, please
                           contact:

Mark Ginnebaugh, User Group Leader mark@designmind.com

More Related Content

Similar to MySpace Data Architecture June 2009

Vtug spring ahead Microsoft Storage Spaces by dan stolts (it pro-guru)
Vtug spring ahead Microsoft Storage Spaces by dan stolts (it pro-guru)Vtug spring ahead Microsoft Storage Spaces by dan stolts (it pro-guru)
Vtug spring ahead Microsoft Storage Spaces by dan stolts (it pro-guru)
csharney
 

Similar to MySpace Data Architecture June 2009 (20)

Expert summit SQL Server 2016
Expert summit   SQL Server 2016Expert summit   SQL Server 2016
Expert summit SQL Server 2016
 
What's new in SQL Server 2016
What's new in SQL Server 2016What's new in SQL Server 2016
What's new in SQL Server 2016
 
Building a high-performance data lake analytics engine at Alibaba Cloud with ...
Building a high-performance data lake analytics engine at Alibaba Cloud with ...Building a high-performance data lake analytics engine at Alibaba Cloud with ...
Building a high-performance data lake analytics engine at Alibaba Cloud with ...
 
Prague data management meetup 2018-03-27
Prague data management meetup 2018-03-27Prague data management meetup 2018-03-27
Prague data management meetup 2018-03-27
 
Large Scale SQL Considerations for SharePoint Deployments
Large Scale SQL Considerations for SharePoint DeploymentsLarge Scale SQL Considerations for SharePoint Deployments
Large Scale SQL Considerations for SharePoint Deployments
 
MinneBar 2013 - Scaling with Cassandra
MinneBar 2013 - Scaling with CassandraMinneBar 2013 - Scaling with Cassandra
MinneBar 2013 - Scaling with Cassandra
 
SQLServer Database Structures
SQLServer Database Structures SQLServer Database Structures
SQLServer Database Structures
 
Data Aware Enterprise v2
Data Aware Enterprise v2Data Aware Enterprise v2
Data Aware Enterprise v2
 
Huawei Symantec Oceanspace N8000 clustered NAS Overview
Huawei Symantec Oceanspace N8000 clustered NAS OverviewHuawei Symantec Oceanspace N8000 clustered NAS Overview
Huawei Symantec Oceanspace N8000 clustered NAS Overview
 
Azure SQL Managed Instance - SqlBits 2019
Azure SQL Managed Instance - SqlBits 2019Azure SQL Managed Instance - SqlBits 2019
Azure SQL Managed Instance - SqlBits 2019
 
Running a Megasite on Microsoft Technologies
Running a Megasite on Microsoft TechnologiesRunning a Megasite on Microsoft Technologies
Running a Megasite on Microsoft Technologies
 
SharePoint Saturday Michigan Keynote - Top 5 Infrastructure Concerns for a Sh...
SharePoint Saturday Michigan Keynote - Top 5 Infrastructure Concerns for a Sh...SharePoint Saturday Michigan Keynote - Top 5 Infrastructure Concerns for a Sh...
SharePoint Saturday Michigan Keynote - Top 5 Infrastructure Concerns for a Sh...
 
Vtug spring ahead Microsoft Storage Spaces by dan stolts (it pro-guru)
Vtug spring ahead Microsoft Storage Spaces by dan stolts (it pro-guru)Vtug spring ahead Microsoft Storage Spaces by dan stolts (it pro-guru)
Vtug spring ahead Microsoft Storage Spaces by dan stolts (it pro-guru)
 
Building Analytic Apps for SaaS: “Analytics as a Service”
Building Analytic Apps for SaaS: “Analytics as a Service”Building Analytic Apps for SaaS: “Analytics as a Service”
Building Analytic Apps for SaaS: “Analytics as a Service”
 
(DAT312) Using Amazon Aurora for Enterprise Workloads
(DAT312) Using Amazon Aurora for Enterprise Workloads(DAT312) Using Amazon Aurora for Enterprise Workloads
(DAT312) Using Amazon Aurora for Enterprise Workloads
 
Exchange Server 2013 Database and Store Changes
Exchange Server 2013 Database and Store ChangesExchange Server 2013 Database and Store Changes
Exchange Server 2013 Database and Store Changes
 
Best storage engine for MySQL
Best storage engine for MySQLBest storage engine for MySQL
Best storage engine for MySQL
 
Data Lakehouse, Data Mesh, and Data Fabric (r1)
Data Lakehouse, Data Mesh, and Data Fabric (r1)Data Lakehouse, Data Mesh, and Data Fabric (r1)
Data Lakehouse, Data Mesh, and Data Fabric (r1)
 
Data Lakehouse, Data Mesh, and Data Fabric (r2)
Data Lakehouse, Data Mesh, and Data Fabric (r2)Data Lakehouse, Data Mesh, and Data Fabric (r2)
Data Lakehouse, Data Mesh, and Data Fabric (r2)
 
Getting Started with Amazon Redshift
Getting Started with Amazon RedshiftGetting Started with Amazon Redshift
Getting Started with Amazon Redshift
 

More from Mark Ginnebaugh

More from Mark Ginnebaugh (20)

Automating Microsoft Power BI Creations 2015
Automating Microsoft Power BI Creations 2015Automating Microsoft Power BI Creations 2015
Automating Microsoft Power BI Creations 2015
 
Microsoft SQL Server Analysis Services (SSAS) - A Practical Introduction
Microsoft SQL Server Analysis Services (SSAS) - A Practical Introduction Microsoft SQL Server Analysis Services (SSAS) - A Practical Introduction
Microsoft SQL Server Analysis Services (SSAS) - A Practical Introduction
 
Platfora - An Analytics Sandbox In A World Of Big Data
Platfora - An Analytics Sandbox In A World Of Big DataPlatfora - An Analytics Sandbox In A World Of Big Data
Platfora - An Analytics Sandbox In A World Of Big Data
 
Microsoft SQL Server Relational Databases and Primary Keys
Microsoft SQL Server Relational Databases and Primary KeysMicrosoft SQL Server Relational Databases and Primary Keys
Microsoft SQL Server Relational Databases and Primary Keys
 
DesignMind Microsoft Business Intelligence SQL Server
DesignMind Microsoft Business Intelligence SQL ServerDesignMind Microsoft Business Intelligence SQL Server
DesignMind Microsoft Business Intelligence SQL Server
 
San Francisco Bay Area SQL Server July 2013 meetings
San Francisco Bay Area SQL Server July 2013 meetingsSan Francisco Bay Area SQL Server July 2013 meetings
San Francisco Bay Area SQL Server July 2013 meetings
 
Silicon Valley SQL Server User Group June 2013
Silicon Valley SQL Server User Group June 2013Silicon Valley SQL Server User Group June 2013
Silicon Valley SQL Server User Group June 2013
 
Microsoft SQL Server Continuous Integration
Microsoft SQL Server Continuous IntegrationMicrosoft SQL Server Continuous Integration
Microsoft SQL Server Continuous Integration
 
Hortonworks Big Data & Hadoop
Hortonworks Big Data & HadoopHortonworks Big Data & Hadoop
Hortonworks Big Data & Hadoop
 
Microsoft SQL Server Physical Join Operators
Microsoft SQL Server Physical Join OperatorsMicrosoft SQL Server Physical Join Operators
Microsoft SQL Server Physical Join Operators
 
Microsoft PowerPivot & Power View in Excel 2013
Microsoft PowerPivot & Power View in Excel 2013Microsoft PowerPivot & Power View in Excel 2013
Microsoft PowerPivot & Power View in Excel 2013
 
Microsoft Data Warehouse Business Intelligence Lifecycle - The Kimball Approach
Microsoft Data Warehouse Business Intelligence Lifecycle - The Kimball ApproachMicrosoft Data Warehouse Business Intelligence Lifecycle - The Kimball Approach
Microsoft Data Warehouse Business Intelligence Lifecycle - The Kimball Approach
 
Fusion-io Memory Flash for Microsoft SQL Server 2012
Fusion-io Memory Flash for Microsoft SQL Server 2012Fusion-io Memory Flash for Microsoft SQL Server 2012
Fusion-io Memory Flash for Microsoft SQL Server 2012
 
Microsoft Data Mining 2012
Microsoft Data Mining 2012Microsoft Data Mining 2012
Microsoft Data Mining 2012
 
Microsoft SQL Server PASS News August 2012
Microsoft SQL Server PASS News August 2012Microsoft SQL Server PASS News August 2012
Microsoft SQL Server PASS News August 2012
 
Business Intelligence Dashboard Design Best Practices
Business Intelligence Dashboard Design Best PracticesBusiness Intelligence Dashboard Design Best Practices
Business Intelligence Dashboard Design Best Practices
 
Microsoft Mobile Business Intelligence
Microsoft Mobile Business Intelligence Microsoft Mobile Business Intelligence
Microsoft Mobile Business Intelligence
 
Microsoft SQL Server 2012 Cloud Ready
Microsoft SQL Server 2012 Cloud ReadyMicrosoft SQL Server 2012 Cloud Ready
Microsoft SQL Server 2012 Cloud Ready
 
Microsoft SQL Server 2012 Master Data Services
Microsoft SQL Server 2012 Master Data ServicesMicrosoft SQL Server 2012 Master Data Services
Microsoft SQL Server 2012 Master Data Services
 
Microsoft SQL Server PowerPivot
Microsoft SQL Server PowerPivotMicrosoft SQL Server PowerPivot
Microsoft SQL Server PowerPivot
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Recently uploaded (20)

Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
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
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 

MySpace Data Architecture June 2009

  • 1. THE MYSPACE DATA ARCHITECTURE: SCALING FOR RAPID AND SUSTAINABLE GROWTH SPEAKER: CHRISTA STELZMULLER MYSPACE CHIEF DATA ARCHITECT SILICON VALLEY SQL SERVER USER GROUP JUNE 2009 MARK GINNEBAUGH, USER GROUP LEADER http://www.meetup.com/The-SiliconValley-SQL-Server-User-Group/
  • 2. Christa Stelzmuller Chief Data Architect at MySpace since Oct 2006 Formerly at Yahoo! Engineering Manager Data Architect for the Yahoo! Music Team Specializes in very large databases with high volumes of transactions Tonight’s Topic: The MySpace Data Architecture: Scaling for Rapid and Sustainable Growth
  • 3. Data Services Organization Operations Storage Database Development Database Search ETL & Infrastructure Warehousing Mining
  • 5. Scaling the Database Tier Scale out, not up Functional separation Horizontal partitioning within functions Design Principles Decoupled and isolated Flexibility and predictability in scaling according to usage Distributed transaction load Improved administration
  • 6. Functional Separation Logical Segments Profiles Core user generated data User relationships to features Mail User-to-user communication data Features Content specific or feature specific, not user specific Search & Browse Read only Redundant denormalized stores
  • 7. Functional Separation Infrastructure Segments Security Signup & Login Spam fighting Shared Globally queryable core user data SSIS & Dispatcher Database-to-database communication (ETL) Messaging based (dispatcher) Package based (SSIS) Distribution Replication
  • 8. Horizontal Partitioning Inter-database Partitioning Approaches Divide by primary access pattern (key based) Range based schemes Modulo based schemes Write Master/Read Slave Dedicated write master with replicated read slaves Dedicated write master with non-replicated slaves Disparate masters with non-replicated slaves Intra-database Partitioning Approaches Vertical table partitioning More horizontal table partitioning!
  • 9. How distributed are we? Logical Segments Profiles: 487 databases and growing 1 every 3 days Mail: 487 databases and growing 1 every 3 days Search & Browse: 24 databases and stable Features: 88 databases and growing 2 every month Infrastructure Segments Security: 6 databases and stable Shared: 8 databases and stable SSIS & Dispatcher: 30 databases and stable Distribution: 5 databases and stable
  • 10. Challenges with Scaling Out Data Integrity Service Broker/Dispatcher Tier Hopper Read/Write Volatility Prepopulator Transaction Manager Targeted Persistent Cache Implementations Administering all those servers Self-tuning intelligent systems
  • 11. Service Dispatcher Service Broker Enabled asynchronous transactions intra- and inter-database Only allows for unicast messaging, requiring a physical route between each service and database Solution was to extend SB’s functionality Centralizes route management from individual databases by utilizing custom gateways Enables multicast messaging Abstracts complex SB components for rapid development
  • 13. Tier Hopper Problem Database initiated changes needed to be synchronized with cache Database initiated events needed to be exchanged with non-DB systems Solution was to build a service to meet these needs Service Broker, SQL-CLR, and Windows Service Completely asynchronous Currently centralized
  • 15. Prepopulator Problem Web server brokered updates of cache from the databases put unnecessary pressure on databases for relatively static objects Multi-directional data flows are subject to race conditions which put extra pressure on the database to resolve Solution was to build a “pump” to feed cache Decoupled, pull-based Expensive transformation business logic is hosted here instead of the databases Manages complex joining of data to build objects
  • 16. Transaction Manager Problem Web server initiated writes had no resiliency to outages No atomicity of transactions that crossed different databases or disparate data stores Solution was to move write handling from web servers to a different tier Asynchronous, persistent queue backed writes Supports DR multi-data center scenarios Supports writes to multiple storage platforms Supports business logic work items for extending logic within the transaction
  • 17. Evolution of Reads/Writes Volatile, Less Resilient Persistent, Resilient
  • 18. Self- Self-tuning Systems History of Major Problems CPU spikes Excessive IO consumption Causes Fragmentation Outdated statistics Solution was to create a process that addressed fragmentation and statistics in a controlled fashion
  • 19. Self- Self-tuning Systems Data collection Every fifteen minutes performance data is captured from all the servers and aggregated in a data warehouse Baselines are established for each farm and for each server Auto-Response Top ten worst offenders Fix CPU
  • 20. Self- Self-tuning Systems Index defragmentation Nightly reorganizing or reindexing of fragmented objects Intelligent and limited updates based on object analysis Statistics Updates Nightly updates of statistics based on a row modification of 15% Prioritizes most modified first Includes internal system tables Recompiles dependent procedures
  • 22. Other Challenges Managing Growth Data growth (datafile vs. database) Transaction Log Balancing IO SAN hot spots Evenly distribute reads and writes
  • 23. Backups & Disaster Recovery Multi-Tier Backups Daily snaps on production Inservs, retention 3 days Remote Copy between Production & Near Line Production data replicated to Near Line Inservs daily Daily snaps on Near Line Inservs, retention 5 days Snap Verify Multi-Tier DR Hot - transactions replicated Warm - block level replication Cold - Snaps
  • 24. Database & Storage Stats Volume, Server, DB Stats Total Volumes 2989 Total Servers 669 Total Databases 1512 Total Database Files 17715 Production Near Line Total Space (TB) 2331.94 1745.64 Total Used Space (TB) 1333.3 904.99 Total Free Space (TB) 998.66 839.28 Production Near Line Total Disks 15120 2560
  • 25. Database & Storage Stats Average Average MySpace DB Connections/Server Requests/sec/Server Profile 6,800 1,100 Mail 4,400 775 Shared 2,000 1,600 Features 800 400 Security 4,800 3,700 Search 300 500 Browse 80 500 Dispatcher 6 1200
  • 26. Database & Storage Stats 6 GB/s data transfer rate 70% Writes and 30% Reads 600,000 to 750,000 IOps across all frames 170 Mb/s data replication over IP from production to backup (40-45 TB sync per day) 10 Brocade 48k Director switches with 256 Ports per switch (2560 total ports) 8 Brocade 7500 FCIP switches with 16 ports per switch (128 total ports and 16 1GE ports)
  • 27. Upcoming Meetings Silicon Valley SQL Server User Group July 21, 2009 Peter Myers Solid Quality Mentors Taking Your Application Design to the Next Level with Data Mining www.bayareasql.org August 18, 2009 Elizabeth Diamond, DesignMind Architecting a Data Warehouse: A Case Study
  • 28. Join our LinkedIn Group Name of Group: Silicon Valley SQL Server User Group Purpose: Networking SQL Server News and discussions Meeting announcements /availability of slide decks Job posts and search Join here: http://www.linkedin.com/groupInvitation?gid=1774133&sharedKey=6697B472F26D
  • 29. To learn more or inquire about speaking opportunities, please contact: Mark Ginnebaugh, User Group Leader mark@designmind.com