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

Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
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
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 

Recently uploaded (20)

Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
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
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 

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/