SlideShare a Scribd company logo
Scaling DB with SQL Azure
       Federations
               Alexander Koval
           Codemasters International
           Software Architect, MCPD
Presentation Summary
• Intended Audience: Developers, Architects

• Intended Time: 60 min

• Objectives:
  1.   Review Scaling concepts for DB
  2.   Introduce SQL Azure Federations
  3.   Managing Azure Federations
  4.   Billing & Pricing
  5.   Tools & Libraries
Problem Areas

 Response Time



            DB Transactions

                   DB Size
Scaling the DB layer
Scaling UP              Table Partitioning
Master/Slave            Scaling OUT (Sharding)
Cluster Computing
      App Server #1          DB1

      App Server #2          DB1

      App Server #3          DB1

      App Server #3         DB1
What is a SQL Azure Federation?

                   F   Federation
                   e   Member #1
                   d
                   e
                   r   Federation
   User Database   a   Member #2
                   t
                   i   Federation
                   o   Member #3
                   n
Terminology
1. Federation
2. Federation Key (UNIQUEIDENTIFIER, INT, BIGINT, VARBINARY)

      CREATE FEDERATION Tenant_Fed (id INT RANGE)
3. Federation Member                            Federation Members

4. Atomic Unit                Federation Root
5. Table Data
  •   Federation Root             Central             Federated
  •   Federation Tables           Tables                Tables
  •   Reference Tables                                   Reference
  •   Central Tables                                       Tables
Create Federation Table
CREATE TABLE [dbo].[TenantDocuments](
  [ID] [int] NOT NULL,
  [TenantID] [int] NOT NULL,
  [Title] [varchar](50) NOT NULL,
 CONSTRAINT [PK_Account] PRIMARY KEY CLUSTERED
(
  [ID] ASC,
  [TenantID] ASC
)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF)
)
FEDERATED ON (TID = TenantID)
GO
DEMO
Management of Azure Federations
                  ALTER FEDERATION Tenant_Fed SPLIT AT (TenantId=10)

    My DB

                                 Accounts_Fed




ALTER FEDERATION federation_name
{ SPLIT AT (distribution_name = boundary_value)
| DROP AT ([LOW|HIGH] distribution_name =
boundary_value)
}[;]
Management of Azure Federations
Monitoring and Metadata
                            Federation Operation Views
                    sys.dm_federation_operations
                    sys.dm_federation_operation_members
                    sys.dm_federation_operations_errors
                    sys.dm_federation_operation_error_members


       Federation Operation Views               Federation Metadata Tables
sys.federation_history                   sys.federations
sys.federation_member_history            sys.federation_members
sys.federation_distribution_history      sys.federation_distributions
sys.federation_member_distributions      sys.federation_member_distributions
                                         sys.federated_table_columns
DEMO
Billing Model
Principles:
• DB Charges are prorated to a day.
         Example: Cost of 1Gb Web edition is $0.33/day
• All DB that exist in the day are charged
• Only DB that are in ready state are charged

Operations which affect Billing:
• Federation Creation
• Federation Repartitioning Operations
• Modification of Federation Billing properties
ALTER DATABASE database_name {
MODIFY (<edition_options> [, ..n])
}
<edition_options> ::= {
(MAXSIZE = {1|5|10|20|30|40|50|100|150} GB)
| (EDITION = {'web' | 'business'})
} [;]
Tools & Libraries for Scaling DB
• Azure Federation Migration Wizard
      http://sqlazurefedmw.codeplex.com/

• Enzo SQL Shard
     http://enzosqlshard.codeplex.com/

• CloudNinja
      http://cloudninja.codeplex.com/

• Multi-tenant SQL Azure Federation Sample
     http://shard.codeplex.com/
Resources
• DB Sharding
  http://www.codefutures.com/database-sharding/

• MSDN: Federations in SQL Azure
   http://msdn.microsoft.com/en-us/library/windowsazure/hh597452.aspx

• Federation Statements
   http://msdn.microsoft.com/en-us/library/windowsazure/hh597463.aspx

• Federation Guidelines and Limitations
  http://msdn.microsoft.com/en-us/library/windowsazure/hh597469.aspx

• Blog
   http://www.codemastersintl.com/Blogs/Alexander-Koval

• Email
   akoval@codemastersintl.com
Questions?

More Related Content

PPTX
Azure cosmos db, Azure no-SQL database,
PPTX
JBoss Training and Consultation by experienced professional
PDF
Oracle dba trainining in hyderabad
PPTX
Mysql workbench 5
PDF
Hadoop 101
PPT
IBM DB2 LUW UDB DBA Training by www.etraining.guru
PPTX
Why you should(n't) run your databases in the cloud
PPT
2 db2 instance creation
Azure cosmos db, Azure no-SQL database,
JBoss Training and Consultation by experienced professional
Oracle dba trainining in hyderabad
Mysql workbench 5
Hadoop 101
IBM DB2 LUW UDB DBA Training by www.etraining.guru
Why you should(n't) run your databases in the cloud
2 db2 instance creation

What's hot (13)

PPTX
Sergiy Lunyakin "Azure SQL DWH: Tips and Tricks for developers"
PPTX
Digging Into Gutenberg
PPTX
MySQL database
PPS
Introduction to Mysql
PPTX
Architecting virtualized infrastructure for big data presentation
PPTX
S3 l3 db2 environment - instances
PPTX
Interface database metadata
PDF
Java Web Programming Using Cloud Platform: Module 3
PPTX
Drupal 7 Features - Introduction - Basics
PPT
active-directory-domain-services
PPTX
Geek Sync | SQL Security Principals and Permissions 101
DOCX
Trainmesfottech - Sql Server DBA Training Course Content
PDF
Hostingultraso com (10)
Sergiy Lunyakin "Azure SQL DWH: Tips and Tricks for developers"
Digging Into Gutenberg
MySQL database
Introduction to Mysql
Architecting virtualized infrastructure for big data presentation
S3 l3 db2 environment - instances
Interface database metadata
Java Web Programming Using Cloud Platform: Module 3
Drupal 7 Features - Introduction - Basics
active-directory-domain-services
Geek Sync | SQL Security Principals and Permissions 101
Trainmesfottech - Sql Server DBA Training Course Content
Hostingultraso com (10)
Ad

Viewers also liked (20)

PPTX
RESPONSIVE WEB DESIGN
PPTX
Введение в Knockout
PPTX
KNOCKOUTJS КАК РЕАЛИЗАЦИЯ MVVM
PPTX
Основы "мобильной" разработки на примере платформы iOs (iPhone)
PPTX
ЭЛЕМЕНТЫ ИСКУСТВЕННОГО ИНТЕЛЛЕКТА ПРИ ПРОГРАММИРОВАНИИ. (http://tuladev.net/e...
PPTX
Thinking in parallel ab tuladev
PPTX
SIGNALR - ОБМЕН СООБЩЕНИЯМИ В РЕАЛЬНОМ ВРЕМЕНИ
PPTX
Алгоритмы шифрования и их применение в .Net приложениях для защиты данных.
PPT
РАЗРАБОТКА ПО С ИСПОЛЬЗОВАНИЕМ FINITE STATE MACHINE.
PPTX
РАЗРАБОТКА МОБИЛЬНЫХ САЙТОВ
PPTX
СИ++ УМЕР. ДА ЗДРАВСТВУЕТ СИ++
PPTX
Unit tests
PDF
Domain-Driven Design: Модель вместо требований
PPTX
TDD (Test-driven Development) как стиль разработки.
PPTX
PaaS и SaaS
PPTX
Автоматизированное тестирование UI на C# + Selenium WebDriver
PPTX
Реализация REST и SOAP сервисов с помощью WCF
PPTX
Ruby - или зачем мне еще один язык программирования?
PPTX
Domain Driven Design
PPT
Лекция Android
RESPONSIVE WEB DESIGN
Введение в Knockout
KNOCKOUTJS КАК РЕАЛИЗАЦИЯ MVVM
Основы "мобильной" разработки на примере платформы iOs (iPhone)
ЭЛЕМЕНТЫ ИСКУСТВЕННОГО ИНТЕЛЛЕКТА ПРИ ПРОГРАММИРОВАНИИ. (http://tuladev.net/e...
Thinking in parallel ab tuladev
SIGNALR - ОБМЕН СООБЩЕНИЯМИ В РЕАЛЬНОМ ВРЕМЕНИ
Алгоритмы шифрования и их применение в .Net приложениях для защиты данных.
РАЗРАБОТКА ПО С ИСПОЛЬЗОВАНИЕМ FINITE STATE MACHINE.
РАЗРАБОТКА МОБИЛЬНЫХ САЙТОВ
СИ++ УМЕР. ДА ЗДРАВСТВУЕТ СИ++
Unit tests
Domain-Driven Design: Модель вместо требований
TDD (Test-driven Development) как стиль разработки.
PaaS и SaaS
Автоматизированное тестирование UI на C# + Selenium WebDriver
Реализация REST и SOAP сервисов с помощью WCF
Ruby - или зачем мне еще один язык программирования?
Domain Driven Design
Лекция Android
Ad

Similar to Sql azure federations (20)

PPTX
Multi-Tenant Approach
PDF
KoprowskiT_SQLSat230_Rheinland_SQLAzure-fromPlantoBackuptoCloud
PDF
SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginners
PPTX
Cloud architectural patterns and Microsoft Azure tools
PPTX
Windows Azure SQL Database Federations
PPTX
Partially Contained Databases
PPT
Ms sql server architecture
PPTX
Migrating on premises workload to azure sql database
PPTX
SQL Server - High availability
PDF
Azure Fundamentals.pdf
PDF
44spotkaniePLSSUGWRO_CoNowegowKrainieChmur
PPTX
PDF
Azure - Data Platform
PDF
A to z for sql azure databases
PDF
KoprowskiT_SQLSoton_WADBforbeginners
PDF
FREE Sql Server syllabus
PPTX
Microsoft SQL Azure - Building Applications Using SQL Azure Presentation
PPTX
AZMS PRESENTATION.pptx
PPTX
Sage 300 ERP: Technical Tour of Diagnostic Tools
PPTX
Copy Data Management for the DBA
Multi-Tenant Approach
KoprowskiT_SQLSat230_Rheinland_SQLAzure-fromPlantoBackuptoCloud
SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginners
Cloud architectural patterns and Microsoft Azure tools
Windows Azure SQL Database Federations
Partially Contained Databases
Ms sql server architecture
Migrating on premises workload to azure sql database
SQL Server - High availability
Azure Fundamentals.pdf
44spotkaniePLSSUGWRO_CoNowegowKrainieChmur
Azure - Data Platform
A to z for sql azure databases
KoprowskiT_SQLSoton_WADBforbeginners
FREE Sql Server syllabus
Microsoft SQL Azure - Building Applications Using SQL Azure Presentation
AZMS PRESENTATION.pptx
Sage 300 ERP: Technical Tour of Diagnostic Tools
Copy Data Management for the DBA

More from Pavel Tsukanov (11)

PPTX
МАШИННОЕ ЗРЕНИЕ С ИСПОЛЬЗОВАНИЕ OPENCV
PPTX
CONTINUOUS INTEGRATION ДЛЯ ЧАЙНИКОВ ВМЕСТЕ С TEAMCITY
PPTX
СОЗДАЙ РОБОТА С НУЛЯ
PPT
ВВЕДЕНИЕ В NODE.JS
PPTX
АНИМАЦИЯ В FLASH И HTML5
PPT
ХАКЕРЫ И АНТИХАКЕРЫ
PPTX
ЗАРАБОТОК В ИНТЕРНЕТЕ.
PPT
ORM технологии в .NET (Nhibernate, Linq To SQL, Entity Framework)
PPTX
Как писать красивый код или основы SOLID
PPTX
Статический анализ кода
PPTX
Применение нейронных сетей и генетических алгоритмов при торговле на бирже.
МАШИННОЕ ЗРЕНИЕ С ИСПОЛЬЗОВАНИЕ OPENCV
CONTINUOUS INTEGRATION ДЛЯ ЧАЙНИКОВ ВМЕСТЕ С TEAMCITY
СОЗДАЙ РОБОТА С НУЛЯ
ВВЕДЕНИЕ В NODE.JS
АНИМАЦИЯ В FLASH И HTML5
ХАКЕРЫ И АНТИХАКЕРЫ
ЗАРАБОТОК В ИНТЕРНЕТЕ.
ORM технологии в .NET (Nhibernate, Linq To SQL, Entity Framework)
Как писать красивый код или основы SOLID
Статический анализ кода
Применение нейронных сетей и генетических алгоритмов при торговле на бирже.

Recently uploaded (20)

PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
A Presentation on Artificial Intelligence
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PPTX
MYSQL Presentation for SQL database connectivity
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Encapsulation theory and applications.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Modernizing your data center with Dell and AMD
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Machine learning based COVID-19 study performance prediction
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
A Presentation on Artificial Intelligence
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
20250228 LYD VKU AI Blended-Learning.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
CIFDAQ's Market Insight: SEC Turns Pro Crypto
MYSQL Presentation for SQL database connectivity
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
The AUB Centre for AI in Media Proposal.docx
Reach Out and Touch Someone: Haptics and Empathic Computing
Encapsulation theory and applications.pdf
Review of recent advances in non-invasive hemoglobin estimation
Digital-Transformation-Roadmap-for-Companies.pptx
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Per capita expenditure prediction using model stacking based on satellite ima...
Encapsulation_ Review paper, used for researhc scholars
Modernizing your data center with Dell and AMD
Building Integrated photovoltaic BIPV_UPV.pdf
Machine learning based COVID-19 study performance prediction

Sql azure federations

  • 1. Scaling DB with SQL Azure Federations Alexander Koval Codemasters International Software Architect, MCPD
  • 2. Presentation Summary • Intended Audience: Developers, Architects • Intended Time: 60 min • Objectives: 1. Review Scaling concepts for DB 2. Introduce SQL Azure Federations 3. Managing Azure Federations 4. Billing & Pricing 5. Tools & Libraries
  • 3. Problem Areas Response Time DB Transactions DB Size
  • 4. Scaling the DB layer Scaling UP Table Partitioning Master/Slave Scaling OUT (Sharding) Cluster Computing App Server #1 DB1 App Server #2 DB1 App Server #3 DB1 App Server #3 DB1
  • 5. What is a SQL Azure Federation? F Federation e Member #1 d e r Federation User Database a Member #2 t i Federation o Member #3 n
  • 6. Terminology 1. Federation 2. Federation Key (UNIQUEIDENTIFIER, INT, BIGINT, VARBINARY) CREATE FEDERATION Tenant_Fed (id INT RANGE) 3. Federation Member Federation Members 4. Atomic Unit Federation Root 5. Table Data • Federation Root Central Federated • Federation Tables Tables Tables • Reference Tables Reference • Central Tables Tables
  • 7. Create Federation Table CREATE TABLE [dbo].[TenantDocuments]( [ID] [int] NOT NULL, [TenantID] [int] NOT NULL, [Title] [varchar](50) NOT NULL, CONSTRAINT [PK_Account] PRIMARY KEY CLUSTERED ( [ID] ASC, [TenantID] ASC )WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF) ) FEDERATED ON (TID = TenantID) GO
  • 9. Management of Azure Federations ALTER FEDERATION Tenant_Fed SPLIT AT (TenantId=10) My DB Accounts_Fed ALTER FEDERATION federation_name { SPLIT AT (distribution_name = boundary_value) | DROP AT ([LOW|HIGH] distribution_name = boundary_value) }[;]
  • 10. Management of Azure Federations
  • 11. Monitoring and Metadata Federation Operation Views sys.dm_federation_operations sys.dm_federation_operation_members sys.dm_federation_operations_errors sys.dm_federation_operation_error_members Federation Operation Views Federation Metadata Tables sys.federation_history sys.federations sys.federation_member_history sys.federation_members sys.federation_distribution_history sys.federation_distributions sys.federation_member_distributions sys.federation_member_distributions sys.federated_table_columns
  • 12. DEMO
  • 13. Billing Model Principles: • DB Charges are prorated to a day. Example: Cost of 1Gb Web edition is $0.33/day • All DB that exist in the day are charged • Only DB that are in ready state are charged Operations which affect Billing: • Federation Creation • Federation Repartitioning Operations • Modification of Federation Billing properties ALTER DATABASE database_name { MODIFY (<edition_options> [, ..n]) } <edition_options> ::= { (MAXSIZE = {1|5|10|20|30|40|50|100|150} GB) | (EDITION = {'web' | 'business'}) } [;]
  • 14. Tools & Libraries for Scaling DB • Azure Federation Migration Wizard http://sqlazurefedmw.codeplex.com/ • Enzo SQL Shard http://enzosqlshard.codeplex.com/ • CloudNinja http://cloudninja.codeplex.com/ • Multi-tenant SQL Azure Federation Sample http://shard.codeplex.com/
  • 15. Resources • DB Sharding http://www.codefutures.com/database-sharding/ • MSDN: Federations in SQL Azure http://msdn.microsoft.com/en-us/library/windowsazure/hh597452.aspx • Federation Statements http://msdn.microsoft.com/en-us/library/windowsazure/hh597463.aspx • Federation Guidelines and Limitations http://msdn.microsoft.com/en-us/library/windowsazure/hh597469.aspx • Blog http://www.codemastersintl.com/Blogs/Alexander-Koval • Email akoval@codemastersintl.com