SlideShare ist ein Scribd-Unternehmen logo
1 von 16
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?

Weitere ähnliche Inhalte

Was ist angesagt?

Digging Into Gutenberg
Digging Into GutenbergDigging Into Gutenberg
Digging Into Gutenberg
Imran Sayed
 
Architecting virtualized infrastructure for big data presentation
Architecting virtualized infrastructure for big data presentationArchitecting virtualized infrastructure for big data presentation
Architecting virtualized infrastructure for big data presentation
Vlad Ponomarev
 
Interface database metadata
Interface database metadataInterface database metadata
Interface database metadata
myrajendra
 
active-directory-domain-services
active-directory-domain-servicesactive-directory-domain-services
active-directory-domain-services
202066
 

Was ist angesagt? (13)

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

Andere mochten auch

РАЗРАБОТКА МОБИЛЬНЫХ САЙТОВ
РАЗРАБОТКА МОБИЛЬНЫХ САЙТОВРАЗРАБОТКА МОБИЛЬНЫХ САЙТОВ
РАЗРАБОТКА МОБИЛЬНЫХ САЙТОВ
Pavel Tsukanov
 

Andere mochten auch (20)

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

Ähnlich wie Sql azure federations

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
Microsoft Private Cloud
 

Ähnlich wie Sql azure 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
 
SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginners
SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginnersSQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginners
SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginners
 
Cloud architectural patterns and Microsoft Azure tools
Cloud architectural patterns and Microsoft Azure toolsCloud architectural patterns and Microsoft Azure tools
Cloud architectural patterns and Microsoft Azure tools
 
Windows Azure SQL Database Federations
Windows Azure SQL Database FederationsWindows Azure SQL Database Federations
Windows Azure SQL Database Federations
 
Partially Contained Databases
Partially Contained DatabasesPartially Contained Databases
Partially Contained Databases
 
Ms sql server architecture
Ms sql server architectureMs sql server architecture
Ms sql server architecture
 
Migrating on premises workload to azure sql database
Migrating on premises workload to azure sql databaseMigrating on premises workload to azure sql database
Migrating on premises workload to azure sql database
 
SQL Server - High availability
SQL Server - High availabilitySQL Server - High availability
SQL Server - High availability
 
Azure Fundamentals.pdf
Azure Fundamentals.pdfAzure Fundamentals.pdf
Azure Fundamentals.pdf
 
44spotkaniePLSSUGWRO_CoNowegowKrainieChmur
44spotkaniePLSSUGWRO_CoNowegowKrainieChmur44spotkaniePLSSUGWRO_CoNowegowKrainieChmur
44spotkaniePLSSUGWRO_CoNowegowKrainieChmur
 
Day2
Day2Day2
Day2
 
Azure - Data Platform
Azure - Data PlatformAzure - Data Platform
Azure - Data Platform
 
A to z for sql azure databases
A to z for sql azure databasesA to z for sql azure databases
A to z for sql azure databases
 
KoprowskiT_SQLSoton_WADBforbeginners
KoprowskiT_SQLSoton_WADBforbeginnersKoprowskiT_SQLSoton_WADBforbeginners
KoprowskiT_SQLSoton_WADBforbeginners
 
FREE Sql Server syllabus
FREE Sql Server syllabusFREE Sql Server syllabus
FREE Sql Server syllabus
 
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
 
AZMS PRESENTATION.pptx
AZMS PRESENTATION.pptxAZMS PRESENTATION.pptx
AZMS PRESENTATION.pptx
 
Sage 300 ERP: Technical Tour of Diagnostic Tools
Sage 300 ERP: Technical Tour of Diagnostic ToolsSage 300 ERP: Technical Tour of Diagnostic Tools
Sage 300 ERP: Technical Tour of Diagnostic Tools
 
Copy Data Management for the DBA
Copy Data Management for the DBACopy Data Management for the DBA
Copy Data Management for the DBA
 

Mehr von Pavel Tsukanov

Mehr von Pavel Tsukanov (11)

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

Kürzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Kürzlich hochgeladen (20)

Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 

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