SlideShare a Scribd company logo
1 of 21
SQL Database Federations

 Scaling out relational data in Windows Azure




             NEIL MACKENZIE
Who Am I?

 Neil Mackenzie
 Azure Architect @ Satory Global


 Windows Azure MVP
 Blog: http://convective.wordpress.com/
 Twitter: @mknz


 Book:
 Microsoft Windows Azure Development Cookbook
Content

 Windows Azure Platform
 Motivation for SQL Database Federations
 Overview of SQL Database Federations
 Transact-SQL Statements
 DMVs
 Fan-out queries
Windows Azure

 Cloud Services:
   Platform-as-a-Service
         Web roles, worker roles
     Infrastructure-as-a-Service
         Virtual Machines, SQL Server 2012
 Connectivity
   Endpoints, Virtual Network, Service Bus

 Storage
   Windows Azure Storage Service

   Windows Azure SQL Database
SQL Database

 Database-as-a-Service
   Multi-tenanted

   Priced in GB/month

 Database
   One primary and two secondary databases

   Quorum commit

   Maximum size: 150GB

 Programmability
   TDS protocol

   SQL Server authentication

   Change connection string and go
Scalability

 Scale up
   Use more powerful hardware

   Price/performance problem

   Fails at internet scale

 Scale out
   Use commodity hardware

   Cost-effective way to increase performance

   Resilient towards failure
Scale-Out Data

 Use multiple databases (shards)
 Sharding provides:
   Larger data sizes

   Higher performance

 Issues:
   Data distribution

   Connection routing
SQL Database Federations


 Sharding-as-a-Service
 Federated database comprises:
   Root database

   Federation member databases (shards)

 Federation specified by:
   Federation name

   Distribution key

 Routing
   Connection pooling
Federation Members


 Federation member
   Federated data distributed by distribution key range

   Error to insert or update distribution key outside range

   Member databases can have:
     different sizes
     different schemas

 Distribution key in:
   Clustered index

   Each unique index
Table Types


 Federated tables
   In federation members

  CREATE TABLE ( … )
  FEDERATED ON (CustomerId = custId)
 Reference tables
   In federation members

  CREATE TABLE ( … )
 Common tables
   In root database
Federation Operations


 Transact SQL support for federations:
   CREATE FEDERATION

   USE FEDERATION

   ALTER FEDERATION

   DROP FEDERATION
CREATE FEDERATION


 CREATE FEDERATION federation_name
  (distribution_name <data_type> RANGE)
 Data types:
    INT
    BIGINT
    UNIQUEIDENTIFIER
    VARBINARY(n) - n<=900
 Root database can support several federations
   e.g. – customer federation, product federation
USE FEDERATION


   USE FEDERATION ROOT WITH RESET
       Routes connection to root database


   USE FEDERATION federation_name
    (distribution_name = value)
    WITH RESET, FILTERING={ON|OFF}
     Routes connection to appropriate federation member
     FILTERING= OFF allows connection to be used for any data in the
      federation member
     FILTERING=ON restricts connection to a specified distribution
      key
ALTER FEDERATION: SPLIT


   Range:   100                       400   500




ALTER FEDERATION CustomerFederation
SPLIT AT (CustomerId = 200)

   Range:   100    200                400   500
ALTER FEDERATION: DROP

    100     200              400      500


ALTER FEDERATION CustomerFederation
DROP AT (LOW CustomerId = 200)
    100     200              400      500



ALTER FEDERATION CustomerFederation
DROP AT (HIGH CustomerId = 200)
    100     200              400      500
Dynamic Management Views


 Definition
   e.g. sys.federation_member_distributions

 History
   e.g. sys.federation_member_distribution_history

 Operations
   e.g. sys.dm_federation_operations

 Operation errors
   e.g. sys.dm_federation_operation_errors
sys.federation_member_distributions


 Columns
   federation_id         int
   member_id             int          (database id)
   Distribution_name     sysname
   Range_low             sqlvariant
   Range_high            sqlvariant
 Range:
   includes Range_low

   excludes Range_high
Security Principal


 Root database
   CREATE USER user_name FROM LOGIN login_name



 Federation member
   CREATE USER user_name



 Security is otherwise like SQL Database
Fan-Out Queries


 Loop over:
   sys.federation_member_distributions.Range_low

 Perform queries in parallel
 Two-step process
   Member query

   Summary query (if necessary)
Summary


 SQL Database Federations
   Sharding-as-a-Service

   Elastic scalability for SQL Database databases

   Management support

   Developer support
More Information


 MSDN Wiki
  http://bit.ly/A7sUdo


 Cihan Biyikoglu blog:
  http://blogs.msdn.com/b/cbiyikoglu/


 Post based on this presentation:
  http://bit.ly/wqD4Xo

More Related Content

What's hot

SharePoint 2013 App Provisioning Models
SharePoint 2013 App Provisioning ModelsSharePoint 2013 App Provisioning Models
SharePoint 2013 App Provisioning ModelsShailen Sukul
 
SharePoint 2013 Sneak Peek
SharePoint 2013 Sneak PeekSharePoint 2013 Sneak Peek
SharePoint 2013 Sneak PeekShailen Sukul
 
Technical Overview of Microsoft SharePoint Online - Presented by Atidan
Technical Overview of Microsoft SharePoint Online - Presented by AtidanTechnical Overview of Microsoft SharePoint Online - Presented by Atidan
Technical Overview of Microsoft SharePoint Online - Presented by AtidanDavid J Rosenthal
 
SharePoint and Azure - A Match Made in the Clouds
SharePoint and Azure - A Match Made in the CloudsSharePoint and Azure - A Match Made in the Clouds
SharePoint and Azure - A Match Made in the CloudsShailen Sukul
 
Granite state #spug The #microsoftGraph and #SPFx on steroids with #AzureFunc...
Granite state #spug The #microsoftGraph and #SPFx on steroids with #AzureFunc...Granite state #spug The #microsoftGraph and #SPFx on steroids with #AzureFunc...
Granite state #spug The #microsoftGraph and #SPFx on steroids with #AzureFunc...Vincent Biret
 
Development of skype for business and knowledge of
Development of skype for business and knowledge ofDevelopment of skype for business and knowledge of
Development of skype for business and knowledge ofayemyatmoe069
 
Session4-Sharepoint Online-chrismayo
Session4-Sharepoint Online-chrismayoSession4-Sharepoint Online-chrismayo
Session4-Sharepoint Online-chrismayoMithun T. Dhar
 
SharePoint Saturday Sacramento Business Intelligence with SharePoint 2010
SharePoint Saturday Sacramento  Business Intelligence with SharePoint 2010SharePoint Saturday Sacramento  Business Intelligence with SharePoint 2010
SharePoint Saturday Sacramento Business Intelligence with SharePoint 2010Ivan Sanders
 
#SPSottawa The SharePoint Framework and The Microsoft Graph on steroids with ...
#SPSottawa The SharePoint Framework and The Microsoft Graph on steroids with ...#SPSottawa The SharePoint Framework and The Microsoft Graph on steroids with ...
#SPSottawa The SharePoint Framework and The Microsoft Graph on steroids with ...Vincent Biret
 
#Techorama belgium 2018 vincent biret deep dive with the #MicrosoftGraph
#Techorama belgium 2018 vincent biret deep dive with the #MicrosoftGraph#Techorama belgium 2018 vincent biret deep dive with the #MicrosoftGraph
#Techorama belgium 2018 vincent biret deep dive with the #MicrosoftGraphVincent Biret
 
Power apps portal out for public review
Power apps portal  out for public reviewPower apps portal  out for public review
Power apps portal out for public reviewConcetto Labs
 
TechEd Africa 2011 - OFC307: Architecting a Disaster Tolerant and Highly Avai...
TechEd Africa 2011 - OFC307: Architecting a Disaster Tolerant and Highly Avai...TechEd Africa 2011 - OFC307: Architecting a Disaster Tolerant and Highly Avai...
TechEd Africa 2011 - OFC307: Architecting a Disaster Tolerant and Highly Avai...Michael Noel
 
Web Page Composer Webinar
Web Page Composer WebinarWeb Page Composer Webinar
Web Page Composer Webinarricharoy
 
Introduction to Force.com
Introduction to Force.comIntroduction to Force.com
Introduction to Force.comIMC Institute
 
Putting *Sparkle* in Your Social Applications! Customization and Branding wit...
Putting *Sparkle* in Your Social Applications! Customization and Branding wit...Putting *Sparkle* in Your Social Applications! Customization and Branding wit...
Putting *Sparkle* in Your Social Applications! Customization and Branding wit...Mitch Cohen
 
Internet Explorer 8 Deployment - IE8 Firestarter
Internet Explorer 8 Deployment - IE8 FirestarterInternet Explorer 8 Deployment - IE8 Firestarter
Internet Explorer 8 Deployment - IE8 FirestarterMithun T. Dhar
 

What's hot (20)

SharePoint 2013 App Provisioning Models
SharePoint 2013 App Provisioning ModelsSharePoint 2013 App Provisioning Models
SharePoint 2013 App Provisioning Models
 
SharePoint 2013 Sneak Peek
SharePoint 2013 Sneak PeekSharePoint 2013 Sneak Peek
SharePoint 2013 Sneak Peek
 
Technical Overview of Microsoft SharePoint Online - Presented by Atidan
Technical Overview of Microsoft SharePoint Online - Presented by AtidanTechnical Overview of Microsoft SharePoint Online - Presented by Atidan
Technical Overview of Microsoft SharePoint Online - Presented by Atidan
 
SharePoint and Azure - A Match Made in the Clouds
SharePoint and Azure - A Match Made in the CloudsSharePoint and Azure - A Match Made in the Clouds
SharePoint and Azure - A Match Made in the Clouds
 
Intro to power apps
Intro to power appsIntro to power apps
Intro to power apps
 
Granite state #spug The #microsoftGraph and #SPFx on steroids with #AzureFunc...
Granite state #spug The #microsoftGraph and #SPFx on steroids with #AzureFunc...Granite state #spug The #microsoftGraph and #SPFx on steroids with #AzureFunc...
Granite state #spug The #microsoftGraph and #SPFx on steroids with #AzureFunc...
 
Development of skype for business and knowledge of
Development of skype for business and knowledge ofDevelopment of skype for business and knowledge of
Development of skype for business and knowledge of
 
Intro to Force.com Webinar presentation
Intro to Force.com Webinar presentationIntro to Force.com Webinar presentation
Intro to Force.com Webinar presentation
 
Session4-Sharepoint Online-chrismayo
Session4-Sharepoint Online-chrismayoSession4-Sharepoint Online-chrismayo
Session4-Sharepoint Online-chrismayo
 
Office 365 Identity Management options
Office 365 Identity Management options Office 365 Identity Management options
Office 365 Identity Management options
 
SharePoint Saturday Sacramento Business Intelligence with SharePoint 2010
SharePoint Saturday Sacramento  Business Intelligence with SharePoint 2010SharePoint Saturday Sacramento  Business Intelligence with SharePoint 2010
SharePoint Saturday Sacramento Business Intelligence with SharePoint 2010
 
#SPSottawa The SharePoint Framework and The Microsoft Graph on steroids with ...
#SPSottawa The SharePoint Framework and The Microsoft Graph on steroids with ...#SPSottawa The SharePoint Framework and The Microsoft Graph on steroids with ...
#SPSottawa The SharePoint Framework and The Microsoft Graph on steroids with ...
 
#Techorama belgium 2018 vincent biret deep dive with the #MicrosoftGraph
#Techorama belgium 2018 vincent biret deep dive with the #MicrosoftGraph#Techorama belgium 2018 vincent biret deep dive with the #MicrosoftGraph
#Techorama belgium 2018 vincent biret deep dive with the #MicrosoftGraph
 
Power apps portal out for public review
Power apps portal  out for public reviewPower apps portal  out for public review
Power apps portal out for public review
 
TechEd Africa 2011 - OFC307: Architecting a Disaster Tolerant and Highly Avai...
TechEd Africa 2011 - OFC307: Architecting a Disaster Tolerant and Highly Avai...TechEd Africa 2011 - OFC307: Architecting a Disaster Tolerant and Highly Avai...
TechEd Africa 2011 - OFC307: Architecting a Disaster Tolerant and Highly Avai...
 
Web Page Composer Webinar
Web Page Composer WebinarWeb Page Composer Webinar
Web Page Composer Webinar
 
Introduction to Force.com
Introduction to Force.comIntroduction to Force.com
Introduction to Force.com
 
Putting *Sparkle* in Your Social Applications! Customization and Branding wit...
Putting *Sparkle* in Your Social Applications! Customization and Branding wit...Putting *Sparkle* in Your Social Applications! Customization and Branding wit...
Putting *Sparkle* in Your Social Applications! Customization and Branding wit...
 
Internet Explorer 8 Deployment - IE8 Firestarter
Internet Explorer 8 Deployment - IE8 FirestarterInternet Explorer 8 Deployment - IE8 Firestarter
Internet Explorer 8 Deployment - IE8 Firestarter
 
Kma share point 2010 overview infra and dev technical info
Kma share point 2010 overview infra and dev   technical infoKma share point 2010 overview infra and dev   technical info
Kma share point 2010 overview infra and dev technical info
 

Similar to Scaling out relational data in Windows Azure with SQL Database Federations

KoprowskiT_SQLSat230_Rheinland_SQLAzure-fromPlantoBackuptoCloud
KoprowskiT_SQLSat230_Rheinland_SQLAzure-fromPlantoBackuptoCloudKoprowskiT_SQLSat230_Rheinland_SQLAzure-fromPlantoBackuptoCloud
KoprowskiT_SQLSat230_Rheinland_SQLAzure-fromPlantoBackuptoCloudTobias Koprowski
 
Microsoft SQL Azure - Building Applications Using SQL Azure Presentation
Microsoft SQL Azure - Building Applications Using SQL Azure PresentationMicrosoft SQL Azure - Building Applications Using SQL Azure Presentation
Microsoft SQL Azure - Building Applications Using SQL Azure PresentationMicrosoft Private Cloud
 
Sql azure dec_2010 Lynn & Ike
Sql azure dec_2010 Lynn & IkeSql azure dec_2010 Lynn & Ike
Sql azure dec_2010 Lynn & IkeIke Ellis
 
SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginners
SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginnersSQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginners
SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginnersTobias Koprowski
 
Sql azure federations
Sql azure federations Sql azure federations
Sql azure federations Pavel Tsukanov
 
Introduction To Sql Services
Introduction To Sql ServicesIntroduction To Sql Services
Introduction To Sql Servicesllangit
 
Roles y Responsabilidades en SQL Azure
Roles y Responsabilidades en SQL AzureRoles y Responsabilidades en SQL Azure
Roles y Responsabilidades en SQL AzureEduardo Castro
 
Sql database development part 1
Sql database development part 1Sql database development part 1
Sql database development part 1Sqlperfomance
 
SQL Azure Dec 2010 Update
SQL Azure Dec 2010 UpdateSQL Azure Dec 2010 Update
SQL Azure Dec 2010 UpdateEric Nelson
 
SQL Azure Dec Update
SQL Azure Dec UpdateSQL Azure Dec Update
SQL Azure Dec UpdateEric Nelson
 
Creating Flexible Data Services For Enterprise Soa With Wso2 Data Services
Creating Flexible Data Services For Enterprise Soa With Wso2 Data ServicesCreating Flexible Data Services For Enterprise Soa With Wso2 Data Services
Creating Flexible Data Services For Enterprise Soa With Wso2 Data Servicessumedha.r
 
Novidades do SQL Server 2016
Novidades do SQL Server 2016Novidades do SQL Server 2016
Novidades do SQL Server 2016Marcos Freccia
 
Saying goodbye to SQL Server 2000
Saying goodbye to SQL Server 2000Saying goodbye to SQL Server 2000
Saying goodbye to SQL Server 2000ukdpe
 
Application development using Microsoft SQL Server 2000
Application development using Microsoft SQL Server 2000Application development using Microsoft SQL Server 2000
Application development using Microsoft SQL Server 2000webhostingguy
 
SQL Server 2008 Positioning
SQL Server 2008 PositioningSQL Server 2008 Positioning
SQL Server 2008 Positioningukdpe
 
TSQL in SQL Server 2012
TSQL in SQL Server 2012TSQL in SQL Server 2012
TSQL in SQL Server 2012Eduardo Castro
 
Azure Data Fundamentals DP 900 Full Course
Azure Data Fundamentals DP 900 Full CourseAzure Data Fundamentals DP 900 Full Course
Azure Data Fundamentals DP 900 Full CoursePiyush sachdeva
 

Similar to Scaling out relational data in Windows Azure with SQL Database Federations (20)

Multi-Tenant Approach
Multi-Tenant ApproachMulti-Tenant Approach
Multi-Tenant Approach
 
KoprowskiT_SQLSat230_Rheinland_SQLAzure-fromPlantoBackuptoCloud
KoprowskiT_SQLSat230_Rheinland_SQLAzure-fromPlantoBackuptoCloudKoprowskiT_SQLSat230_Rheinland_SQLAzure-fromPlantoBackuptoCloud
KoprowskiT_SQLSat230_Rheinland_SQLAzure-fromPlantoBackuptoCloud
 
Microsoft SQL Azure - Building Applications Using SQL Azure Presentation
Microsoft SQL Azure - Building Applications Using SQL Azure PresentationMicrosoft SQL Azure - Building Applications Using SQL Azure Presentation
Microsoft SQL Azure - Building Applications Using SQL Azure Presentation
 
Sql azure dec_2010 Lynn & Ike
Sql azure dec_2010 Lynn & IkeSql azure dec_2010 Lynn & Ike
Sql azure dec_2010 Lynn & Ike
 
SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginners
SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginnersSQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginners
SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginners
 
Sql azure federations
Sql azure federations Sql azure federations
Sql azure federations
 
Introduction To Sql Services
Introduction To Sql ServicesIntroduction To Sql Services
Introduction To Sql Services
 
Roles y Responsabilidades en SQL Azure
Roles y Responsabilidades en SQL AzureRoles y Responsabilidades en SQL Azure
Roles y Responsabilidades en SQL Azure
 
Sql database development part 1
Sql database development part 1Sql database development part 1
Sql database development part 1
 
SQL Azure Dec 2010 Update
SQL Azure Dec 2010 UpdateSQL Azure Dec 2010 Update
SQL Azure Dec 2010 Update
 
SQL Azure Dec Update
SQL Azure Dec UpdateSQL Azure Dec Update
SQL Azure Dec Update
 
Creating Flexible Data Services For Enterprise Soa With Wso2 Data Services
Creating Flexible Data Services For Enterprise Soa With Wso2 Data ServicesCreating Flexible Data Services For Enterprise Soa With Wso2 Data Services
Creating Flexible Data Services For Enterprise Soa With Wso2 Data Services
 
Novidades do SQL Server 2016
Novidades do SQL Server 2016Novidades do SQL Server 2016
Novidades do SQL Server 2016
 
Saying goodbye to SQL Server 2000
Saying goodbye to SQL Server 2000Saying goodbye to SQL Server 2000
Saying goodbye to SQL Server 2000
 
Sql 2005 high availability
Sql 2005 high availabilitySql 2005 high availability
Sql 2005 high availability
 
Application development using Microsoft SQL Server 2000
Application development using Microsoft SQL Server 2000Application development using Microsoft SQL Server 2000
Application development using Microsoft SQL Server 2000
 
FREE Sql Server syllabus
FREE Sql Server syllabusFREE Sql Server syllabus
FREE Sql Server syllabus
 
SQL Server 2008 Positioning
SQL Server 2008 PositioningSQL Server 2008 Positioning
SQL Server 2008 Positioning
 
TSQL in SQL Server 2012
TSQL in SQL Server 2012TSQL in SQL Server 2012
TSQL in SQL Server 2012
 
Azure Data Fundamentals DP 900 Full Course
Azure Data Fundamentals DP 900 Full CourseAzure Data Fundamentals DP 900 Full Course
Azure Data Fundamentals DP 900 Full Course
 

More from Neil Mackenzie

Project Orleans - Actor Model framework
Project Orleans - Actor Model frameworkProject Orleans - Actor Model framework
Project Orleans - Actor Model frameworkNeil Mackenzie
 
Windows Azure Virtual Machines
Windows Azure Virtual MachinesWindows Azure Virtual Machines
Windows Azure Virtual MachinesNeil Mackenzie
 
Node.js on Windows Azure
Node.js on Windows AzureNode.js on Windows Azure
Node.js on Windows AzureNeil Mackenzie
 
Windows Azure HDInsight Service
Windows Azure HDInsight ServiceWindows Azure HDInsight Service
Windows Azure HDInsight ServiceNeil Mackenzie
 
Brokered Messaging in Windows Azure
Brokered Messaging in Windows AzureBrokered Messaging in Windows Azure
Brokered Messaging in Windows AzureNeil Mackenzie
 
Windows Azure Diagnostics
Windows Azure DiagnosticsWindows Azure Diagnostics
Windows Azure DiagnosticsNeil Mackenzie
 
Introduction to Windows Azure AppFabric Applications
Introduction to Windows Azure AppFabric ApplicationsIntroduction to Windows Azure AppFabric Applications
Introduction to Windows Azure AppFabric ApplicationsNeil Mackenzie
 

More from Neil Mackenzie (8)

Azure DocumentDB
Azure DocumentDBAzure DocumentDB
Azure DocumentDB
 
Project Orleans - Actor Model framework
Project Orleans - Actor Model frameworkProject Orleans - Actor Model framework
Project Orleans - Actor Model framework
 
Windows Azure Virtual Machines
Windows Azure Virtual MachinesWindows Azure Virtual Machines
Windows Azure Virtual Machines
 
Node.js on Windows Azure
Node.js on Windows AzureNode.js on Windows Azure
Node.js on Windows Azure
 
Windows Azure HDInsight Service
Windows Azure HDInsight ServiceWindows Azure HDInsight Service
Windows Azure HDInsight Service
 
Brokered Messaging in Windows Azure
Brokered Messaging in Windows AzureBrokered Messaging in Windows Azure
Brokered Messaging in Windows Azure
 
Windows Azure Diagnostics
Windows Azure DiagnosticsWindows Azure Diagnostics
Windows Azure Diagnostics
 
Introduction to Windows Azure AppFabric Applications
Introduction to Windows Azure AppFabric ApplicationsIntroduction to Windows Azure AppFabric Applications
Introduction to Windows Azure AppFabric Applications
 

Recently uploaded

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
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
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines 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
 
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
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 

Recently uploaded (20)

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
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
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines 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)
 
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
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 

Scaling out relational data in Windows Azure with SQL Database Federations

  • 1. SQL Database Federations Scaling out relational data in Windows Azure NEIL MACKENZIE
  • 2. Who Am I?  Neil Mackenzie  Azure Architect @ Satory Global  Windows Azure MVP  Blog: http://convective.wordpress.com/  Twitter: @mknz  Book: Microsoft Windows Azure Development Cookbook
  • 3. Content  Windows Azure Platform  Motivation for SQL Database Federations  Overview of SQL Database Federations  Transact-SQL Statements  DMVs  Fan-out queries
  • 4. Windows Azure  Cloud Services:  Platform-as-a-Service  Web roles, worker roles  Infrastructure-as-a-Service  Virtual Machines, SQL Server 2012  Connectivity  Endpoints, Virtual Network, Service Bus  Storage  Windows Azure Storage Service  Windows Azure SQL Database
  • 5. SQL Database  Database-as-a-Service  Multi-tenanted  Priced in GB/month  Database  One primary and two secondary databases  Quorum commit  Maximum size: 150GB  Programmability  TDS protocol  SQL Server authentication  Change connection string and go
  • 6. Scalability  Scale up  Use more powerful hardware  Price/performance problem  Fails at internet scale  Scale out  Use commodity hardware  Cost-effective way to increase performance  Resilient towards failure
  • 7. Scale-Out Data  Use multiple databases (shards)  Sharding provides:  Larger data sizes  Higher performance  Issues:  Data distribution  Connection routing
  • 8. SQL Database Federations  Sharding-as-a-Service  Federated database comprises:  Root database  Federation member databases (shards)  Federation specified by:  Federation name  Distribution key  Routing  Connection pooling
  • 9. Federation Members  Federation member  Federated data distributed by distribution key range  Error to insert or update distribution key outside range  Member databases can have:  different sizes  different schemas  Distribution key in:  Clustered index  Each unique index
  • 10. Table Types  Federated tables  In federation members CREATE TABLE ( … ) FEDERATED ON (CustomerId = custId)  Reference tables  In federation members CREATE TABLE ( … )  Common tables  In root database
  • 11. Federation Operations  Transact SQL support for federations:  CREATE FEDERATION  USE FEDERATION  ALTER FEDERATION  DROP FEDERATION
  • 12. CREATE FEDERATION  CREATE FEDERATION federation_name (distribution_name <data_type> RANGE)  Data types:  INT  BIGINT  UNIQUEIDENTIFIER  VARBINARY(n) - n<=900  Root database can support several federations  e.g. – customer federation, product federation
  • 13. USE FEDERATION  USE FEDERATION ROOT WITH RESET  Routes connection to root database  USE FEDERATION federation_name (distribution_name = value) WITH RESET, FILTERING={ON|OFF}  Routes connection to appropriate federation member  FILTERING= OFF allows connection to be used for any data in the federation member  FILTERING=ON restricts connection to a specified distribution key
  • 14. ALTER FEDERATION: SPLIT Range: 100 400 500 ALTER FEDERATION CustomerFederation SPLIT AT (CustomerId = 200) Range: 100 200 400 500
  • 15. ALTER FEDERATION: DROP 100 200 400 500 ALTER FEDERATION CustomerFederation DROP AT (LOW CustomerId = 200) 100 200 400 500 ALTER FEDERATION CustomerFederation DROP AT (HIGH CustomerId = 200) 100 200 400 500
  • 16. Dynamic Management Views  Definition  e.g. sys.federation_member_distributions  History  e.g. sys.federation_member_distribution_history  Operations  e.g. sys.dm_federation_operations  Operation errors  e.g. sys.dm_federation_operation_errors
  • 17. sys.federation_member_distributions  Columns  federation_id int  member_id int (database id)  Distribution_name sysname  Range_low sqlvariant  Range_high sqlvariant  Range:  includes Range_low  excludes Range_high
  • 18. Security Principal  Root database  CREATE USER user_name FROM LOGIN login_name  Federation member  CREATE USER user_name  Security is otherwise like SQL Database
  • 19. Fan-Out Queries  Loop over:  sys.federation_member_distributions.Range_low  Perform queries in parallel  Two-step process  Member query  Summary query (if necessary)
  • 20. Summary  SQL Database Federations  Sharding-as-a-Service  Elastic scalability for SQL Database databases  Management support  Developer support
  • 21. More Information  MSDN Wiki http://bit.ly/A7sUdo  Cihan Biyikoglu blog: http://blogs.msdn.com/b/cbiyikoglu/  Post based on this presentation: http://bit.ly/wqD4Xo

Editor's Notes

  1. Performance / database sizeNew pricing model complicates things since price is not linear in DB sizeFlavorous example
  2. Data Distribution:Range partitioningRound robinHash bucketRouting:Database discoveryConnection managementFlavorusTo support the spike in first-day ticket sales, Flavorus used the Windows Azure platform to host 750 web role instances of the Jetstream application and 550 SQL Azure databases. The application wrote chunks of customer data to multiple sharded SQL Azure databases in parallel. Jetstream was live for two days, after which the company returned the event data to its on-premises servers and continued selling tickets.http://www.microsoft.com/casestudies/Case_Study_Detail.aspx?CaseStudyID=4000011072
  3. A range distribution can be affected by:Data skew – data concentrated in one federation memberOperational skew – data operations concentrated in one federation member
  4. FederatedReferenceCommonIndividual members contain distinct schema
  5. DB_NAME() provides the name of the current federation member.FEDERATION_FILTERING_VALUE(DistributionName) provided the current FILTERING=ON valuehttp://msdn.microsoft.com/en-us/library/windowsazure/hh597465.aspxFederation atomic unit is explicitly not a security boundaryError to insert/update data in wrong member
  6. Only valid when connected to root databaseOrdering of uniqueidentity:00000000-0000-0000-0000-080000000000http://sqlblog.com/blogs/alberto_ferrari/archive/2007/08/31/how-are-guids-sorted-by-sql-server.aspx
  7. Metadatasys.federationssys.federation_memberssys.federation_distributionssys.federation_member_distributionssys.federation_historysys.federation_member_historysys.federation_distribution_historysys.federation_member_distribution_historysys.dm_federation_operationssys.dm_federation_operation_memberssys.dm_federation_operation_errorssys.dm_federation_operation_error_members
  8. LOW is in memberHIGH is NOT in memberIterate over LOW value for member distributions
  9. SQL Azure Federation Data Migration Wizardhttp://sqlazurefedmw.codeplex.com/