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

TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 

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/