0
Scaling DB with SQL Azure       Federations               Alexander Koval           Codemasters International           So...
Presentation Summary• Intended Audience: Developers, Architects• Intended Time: 60 min• Objectives:  1.   Review Scaling c...
Problem Areas Response Time            DB Transactions                   DB Size
Scaling the DB layerScaling UP              Table PartitioningMaster/Slave            Scaling OUT (Sharding)Cluster Comput...
What is a SQL Azure Federation?                   F   Federation                   e   Member #1                   d      ...
Terminology1. Federation2. Federation Key (UNIQUEIDENTIFIER, INT, BIGINT, VARBINARY)      CREATE FEDERATION Tenant_Fed (id...
Create Federation TableCREATE TABLE [dbo].[TenantDocuments](  [ID] [int] NOT NULL,  [TenantID] [int] NOT NULL,  [Title] [v...
DEMO
Management of Azure Federations                  ALTER FEDERATION Tenant_Fed SPLIT AT (TenantId=10)    My DB              ...
Management of Azure Federations
Monitoring and Metadata                            Federation Operation Views                    sys.dm_federation_operati...
DEMO
Billing ModelPrinciples:• DB Charges are prorated to a day.         Example: Cost of 1Gb Web edition is $0.33/day• All DB ...
Tools & Libraries for Scaling DB• Azure Federation Migration Wizard      http://sqlazurefedmw.codeplex.com/• Enzo SQL Shar...
Resources• DB Sharding  http://www.codefutures.com/database-sharding/• MSDN: Federations in SQL Azure   http://msdn.micros...
Questions?
Upcoming SlideShare
Loading in...5
×

Sql azure federations

764

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
764
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
15
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Sql azure federations "

  1. 1. Scaling DB with SQL Azure Federations Alexander Koval Codemasters International Software Architect, MCPD
  2. 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. 3. Problem Areas Response Time DB Transactions DB Size
  4. 4. Scaling the DB layerScaling UP Table PartitioningMaster/Slave Scaling OUT (Sharding)Cluster Computing App Server #1 DB1 App Server #2 DB1 App Server #3 DB1 App Server #3 DB1
  5. 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. 6. Terminology1. Federation2. Federation Key (UNIQUEIDENTIFIER, INT, BIGINT, VARBINARY) CREATE FEDERATION Tenant_Fed (id INT RANGE)3. Federation Member Federation Members4. Atomic Unit Federation Root5. Table Data • Federation Root Central Federated • Federation Tables Tables Tables • Reference Tables Reference • Central Tables Tables
  7. 7. Create Federation TableCREATE 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
  8. 8. DEMO
  9. 9. Management of Azure Federations ALTER FEDERATION Tenant_Fed SPLIT AT (TenantId=10) My DB Accounts_FedALTER FEDERATION federation_name{ SPLIT AT (distribution_name = boundary_value)| DROP AT ([LOW|HIGH] distribution_name =boundary_value)}[;]
  10. 10. Management of Azure Federations
  11. 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 Tablessys.federation_history sys.federationssys.federation_member_history sys.federation_memberssys.federation_distribution_history sys.federation_distributionssys.federation_member_distributions sys.federation_member_distributions sys.federated_table_columns
  12. 12. DEMO
  13. 13. Billing ModelPrinciples:• 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 chargedOperations which affect Billing:• Federation Creation• Federation Repartitioning Operations• Modification of Federation Billing propertiesALTER DATABASE database_name {MODIFY (<edition_options> [, ..n])}<edition_options> ::= {(MAXSIZE = {1|5|10|20|30|40|50|100|150} GB)| (EDITION = {web | business})} [;]
  14. 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. 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
  16. 16. Questions?
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×