Download presentation
Presentation is loading. Please wait.
Published byDavid Robertson Modified over 9 years ago
5
Basic Standard Premium Basic Premium Standard Scale out/in Scale up/down
7
Based on customer feedback we are moving to a model based on Predictable Performance
8
Web / BusinessBasic / Standard / Premium Machine Compute Writes Reads Memory DB 1 DB 2 DB 3 DB 4 DB 7 DB 5 DB 6 DB 8 DB 9 Machine Compute Writes Reads Memory DB 1 DB 2 DB 3 DB 4 DB 7 DB 5 DB 6 DB 8 DB 9 DB 1 DB 2 DB 3 DB 4 DB 7 DB 5 DB 6 DB 8 DB 9 Noisy neighbor! Bounding boxes eliminates noisy neighbors
10
Monitoring % of current Performance Level Utilization 75% Read 50% Write 50% CPU 60% Memory Compute Writes Reads Memory DB workload Bounding Box
12
BasicStandardPremium Performance Levels (DTU) 5S0: 10 S1: 20 S2: 50 P1: 100 P2: 200 P3: 800 ASDB results16,600 tx/hourS1:,520 tx/minute S1:,940 tx/minute S2: 2,570 tx/minute P1: 105 tx/second P2: 228 tx/second P3: 735 tx/second Maximum DB size2GB250GB500GB Price* per hour (month)$0.0069 (~$5)S0: $0.0208 (~$15) S1: $0.0417 (~$30) S2: $0.1042 (~$75) P1: $0.6458 (~$465) P2: $1.292 (~$930) P3: $5.167 (~$3,720) *Starting November 1 st
13
RESULT CPU Writes Reads CPU Writes Reads SELECT * FROM a JOIN b ON … CPU Writes Reads
21
(1) Database (2) Sharding Key... (3) Shard Map Manager (4) Shard (5) Shard Set (6) Sharded Table (7) Reference Table (8) Shardlet Customer IDName 1Alice 2Bob Customer Table Data Center IDDC Name 1Boston 2Miami Data Center Table
22
Application Developer.NET Application Shard Map Management (SMM) Define groups of shards for your application Manage mapping of routing keys to shards Data Dependent Routing (DDR) Route incoming requests to the correct shard, e.g., given a customer ID Ensure correct routing as tenants move Cache routing information for efficiency Multi-Shard Query (MSQ) Interactive processing across several shards Same statement executed on all shards with UNION all semantics Management Service Admin/ DevOps
23
Application Developer.NET Application Admin/ DevOps Management Service Split Merge Service (SMS) Grow or shrink capacity by adding or removing scale units Dynamically adjust scale factor of scale unit Trigger adjustment dynamically through policies Federations Migration Utility Migrate from Federations to Elastic Scale Shard Elasticity (SE) Policy-based horizontal and vertical sharding using Azure Automation
24
[ shards_global ] sidsmidserverdatabase 11Server1DB1 21Server1DB2 [shardmaps_global] smidname 1RangeShardMap [ shard_mappings_global ] midsmidminmaxSid 1101001 21 2002 Shard Set DB 1 [0-100)... DB 2 [100-200) DB 3 [200-300) DB 4 [300-400) DB 5 [400-500) DB 6 [500-600) DB n [n – n+100) Shard Map Manager
25
Client App DDR APIs SELECT * FROM customers WHERE customer ID = 104 DB 1 [0-100)... DB 2 [100-200) DB 3 [200-300) DB 4 [300-400) DB 5 [400-500) DB 6 [500-600) DB n [n – n+100) Application Developer Shard Map Manager
26
// Get a routed connection for a given shardingKey using (SqlConnection conn = ShardMap.OpenConnectionForKey( shardingKey, connectionString /* Credentials Only */, ConnectionOptions.Validate /* Validate */ )); { using (SqlCommand cmd = new SqlCommand() { cmd.Connection = conn; cmd.CommandText = "SELECT * FROM customers WHERE customer ID = 104"; SqlDataReader sdr = cmd.ExecuteReader(); // Now consume results from the data reader… }
27
Client App DDR APIs Cache Application Developer Shard Map Manager GSM DB LSM
28
Client App MSQ APIs SELECT count(*) FROM customers UNION ALL result set DB 1 [0-100)... DB 2 [100-200) DB 3 [200-300) DB 4 [300-400) DB 5 [400-500) DB 6 [500-600) DB n [n – n+100) Application Developer Shard Map Manager
29
using (MultiShardConnection conn = new MultiShardConnection(m_shardMap.GetAllShards(null), MultiShardTestUtils.GetTestSqlCredential())) { using (MultiShardCommand cmd = conn.CreateCommand()) { cmd.CommandText = "SELECT count(*) FROM customers"; cmd.CommandType = CommandType.Text; cmd.Policy = MultiShardPolicy.PartialResults; using (MultiShardDataReader sdr = cmd.ExecuteReader(includeShardNameColumn: true)) { while (sdr.Read()) { // Now consume results from the data reader… }
30
SplitMerge Management Service Admin/ DevOps DB 1 [0-100)... DB 2 [100-200) DB 3 [200-300) DB 4 [300-400) DB 5 [400-500) DB 6 [500-600) DB n [n – n+100) DB 2.1 [0-200) DB 5.1 [400-450) DB 5.2 [450-500)
31
DB 1 [0-100)... DB 2 [100-200) DB 3 [200-300) DB 4 [300-400) DB 5 [400-500) DB 6 [500-600) DB n [n – n+100)
36
www.microsoft.com/learning http://microsoft.com/technet http://channel9.msdn.com/Events/TechEd http://developer.microsoft.com
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.