Scaling out and in with Azure SQL DB Elastic Scale DBA-203 Warner Chaves, MCM/MVP, SQLTurbo.com, Pythian.com.

Slides:



Advertisements
Similar presentations
SSRS 2008 Architecture Improvements Scale-out SSRS 2008 Report Engine Scalability Improvements.
Advertisements

System Center 2012 R2 Overview
Intro to SharePoint 2013 Architecture Liam Cleary.
Amazon RDS (MySQL and Oracle) and SQL Azure Emil Tabakov Telerik Software Academy academy.telerik.com.
GETTING STARTED WITH AZURE SQL DB Warner Chaves SQL MCM / MVP SQLTurbo.com Pythian.com.
 Built for SaaS and enterprise applications  Elastic database model for unpredictable workloads  99.99% availability with global reach  Geo-replication.
| Basel Discovering Windows Azure Mobile Services and Media Services Ken Casada
Capacity Planning in SharePoint Capacity Planning Process of evaluating a technology … Deciding … Hardware … Variety of Ways Different Services.
Platform as a Service (PaaS)
Enterprise Reporting with Reporting Services SQL Server 2005 Donald Farmer Group Program Manager Microsoft Corporation.
Building Offline/Cache Mode Web Apps Using Sync Framework Mike Clark Group Manager Cloud Data Services Team
Windows Azure SQL Database and Storage Name Title Organization.
A Brief Overview by Aditya Dutt March 18 th ’ Aditya Inc.
Training Workshop Windows Azure Platform. Presentation Outline (hidden slide): Technical Level: 200 Intended Audience: Developers Objectives (what do.
Extreme Scaling with SQL Azure SQL Bits 7, York, October 2010 Martin Schmidt – Miracle A/S Denmark.
Security David Frommer Principal Architect Business Intelligence Microsoft Partner of the Year 2005 & 2007.
SQL Azure Intro and What’s New Level: Introductory to Intermediate Andy Thiru SQL/BI Developer.
Windows Role-Based Access Control Longhorn Update
Mirek Sztajno SQL Server Security PM
Department of Computing, School of Electrical Engineering and Computer Sciences, NUST - Islamabad KTH Applied Information Security Lab Secure Sharding.
Text Microsoft to Or Tweet #uktechdays Questions?
Interoperability. Session Objectives and Takeaways Session Objective(s): – Get up to speed on SQL Azure – Learn about the new features in SQL Azure –
4/26/2017 Use Cloud-Based Load Testing Service to Find Scale and Performance Bottlenecks Randy Pagels Sr. Developer Technology Specialist © 2012 Microsoft.
Copyright 2007, Information Builders. Slide 1 iWay Web Services and WebFOCUS Consumption Michael Florkowski Information Builders.
What the $#*! IS my password? Secure Online Password Storage Lon Smith Aaron Gremmert.
AZURE: THE GOOD PARTS WEBAPPS Presented By RICHARD TASKER blog: richardtasker.co.uk.
Miss a User Group meeting? Forget something that you learned? Want to see content from a User Group not in your area? Want to share with a buddy? We.
Building web applications with the Windows Azure Platform Ido Flatow | Senior Architect | Sela | This session.
Azure SQL Database Lori Clark SQL Saturday 10/17/2015.
Putting Your Head in the Cloud Working with SQL Azure David Postlethwaite 19/09/2015David Postlethwaite.
Trimantra Software Solution Offshore Software Development Outsourcing Company Visit :
SQL Server as a Cloud Service November 11th 2015 Warner Chaves SQL MVP/MCM.
1 Copyright © 2008, Oracle. All rights reserved. Repository Basics.
ELASTIC DATABASE CAPABILITIES WITH AZURE SQL DB Silvia Doomra Azure SQL DB Program Management.
Putting Your Head in the Cloud Working with SQL Azure David Postlethwaite 18/06/2016David Postlethwaite.
SQL Server as a Cloud Service April 15th 2016 Warner Chaves Data Platform MVP/SQL Server MCM.
Best Practices for Columnstore Indexes Warner Chaves SQL MCM / MVP SQLTurbo.com Pythian.com.
Use Cases for In-Memory OLTP Warner Chaves SQL MCM / MVP SQLTurbo.com Pythian.com.
Energy Management Solution
Cloud Database Platforms for the SQL DBA
Platform as a Service (PaaS)
Recommended Practices & Fundamentals
Platform as a Service (PaaS)
Real Time Data with Azure and Power BI
Elastic database patterns for SaaS applications in Azure
Example of a page header
Scaling In e Scaling Out através do elastic pool
Power BI Security Best Practices
PowerApps and Microsoft Flow for Business Users
Azure SQL Database – Scaling in and Scaling out with elastic pool
04 – Azure SQL Database Bret Stateham | Senior Technical Evangelist​
Energy Management Solution
Database Testing in Azure Cloud
Warner Chaves MCM / MVP / SQLTurbo.com / Pythian.com
Azure SQL Data Warehouse for SQL Server DBAS
By Saru Radhakrishnan Member - Sacramento SQL Server Group 07/28/2018
Azure SQL Database – Scaling in and Scaling out with elastic pool
Azure SQL Data Warehouse for SQL Server DBAS
Microsoft Azure-Powered Self-Service Insurance Management Tool Gets Products to Market Fast “With Azure, we can provide a genuinely elastic, web-scale.
Azure SQL Database - Managing your database on the cloud
Understanding Azure SQL DB Service Tiers
microsoft cloud platform: enterprise-class architecture
Warner Chaves MCM / MVP / SQLTurbo.com / Pythian.com
Cloud Data Replication with SQL Data Sync
Warner Chaves MCM / MVP / SQLTurbo.com / Pythian.com
MS AZURE By Sauras Pandey.
TN19-TCI: Integration and API management using TIBCO Cloud™ Integration
ZORAN BARAC DATA ARCHITECT at CIN7
06 | SQL Server and the Cloud
The Database World of Azure
Presentation transcript:

Scaling out and in with Azure SQL DB Elastic Scale DBA-203 Warner Chaves, MCM/MVP, SQLTurbo.com, Pythian.com

SQL Server DBA for 10 years. Previously an L3 DBA at HP in Costa Rica, now a Principal Consultant at Pythian in Ottawa Ontario. SQL Server MCM and MVP. Blog: SQLTurbo.com Company: Pythian.com About me 2

Agenda Goal of today: provide an overview of the elastic capabilities of the Azure SQL Database platform. Database elasticity intro Database Elastic Tools Database Elastic Query Database Elastic Pools Database Elastic Jobs 3

We’re going to focus on DbaaS, Azure SQL Db. Building and shrinking database capacity on demand. Elastic scale focuses on scale OUT (“Sharding”), as opposed to just scaling UP. Assume one application, common schema on all dbs. Database layer elasticity 4

1.Hitting resource limits on a scale up solution (CPU-RAM-size). 2.Geographic considerations. 3.Security concerns require separate data. 4.Easier chargeback mechanism for client. 5.Easier to manage individually for a particular client. Why scale out? 5

Provisioning speed. Controlling cost. Shard data movement. Routing the application to the proper database. Querying the databases individually as well as easily querying the global set. Common challenges to scale out 6

A Db elastic solution architecture 7

Creating and working with an elastic data tier

The purpose of the library is to facilitate building applications with an elastic db layer on Azure SQL db. Main concepts: Shard ~ Database Shard Set Shardlet Shard Map Manager Reference tables Elastic db tools:.NET client library 9

Db Elastic Client Library 10

1.Create a database called a “Shard Map Manager”. 2.Register databases as shards in the SMM. 3.Setup the shard distribution method (lists of keys or ranges). 4.Request a connection from the library based on the sharding key (data dependent routing). 5.Use that connection for the db interaction of the shard. 6.Multi-shard queries are possible too. Workflow for the client library 11

The Split/Merge tool helps with rebalancing data in the shard set. You can SPLIT a db into multiple. You can MERGE multiple dbs into one. These operations allow to respond to changes in capacity needs. It’s delivered as a customer-hosted Azure service. Elastic db tools: Split/Merge tool 12

Elastic db tools: Split/Merge tool 13 Db1 DbN MERGESPLIT Split/Merge Service ShardMap SplitMergeDb

Elastic db tools: Split/Merge interface 14

Elastic db tools: Split/Merge interface 15

Allows querying a set of databases as a single entity through one connection string. This is useful for 3 rd party apps where we can’t insert the.NET elastic scale library (Excel, SSRS, etc). Elastic Database Query 16

1.A set of Azure SQL Dbs with a common schema (any tier). 2.A shard map and Standard or Premium tier db to be the query connection endpoint. 3.Creating a credential for the elastic query: Configuring Elastic Database Queries 17 CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'password'; CREATE DATABASE SCOPED CREDENTIAL WITH IDENTITY = ' ', SECRET = ' ';

4.Create an external data source on the endpoint db: Configuring Elastic Database Queries 18 CREATE EXTERNAL DATA SOURCE WITH (TYPE = SHARD_MAP_MANAGER, LOCATION = ' ', DATABASE_NAME = ' ', CREDENTIAL =, SHARD_MAP_NAME = ' ');

5.Create an external table: Configuring Elastic Database Queries 19 CREATE EXTERNAL TABLE [ database_name. [ dbo ]. | dbo. ] table_name ( { } [,...n ]) { WITH ( ) } )[;] ::= DATA_SOURCE =, DISTRIBUTION = SHARDED( ) | REPLICATED | ROUND_ROBIN

SP_EXECUTE_FANOUT: can consume a shard map to run a fanout query over the set of sharded databases and concatenate the results. TARGET=RDBMS: cross database queries are supported now by creating a external source that targets a single database. Other flavors of Elastic Db Queries 20

Sample App Demo

Managing elastic resources

Allows pooling Azure SQL resources for a set of dbs for a more efficient performance/cost ratio. The resources are quantified as eDTUs (elastic DTUs). Storage size is also tied to the eDTUs and depend on tier. Different pools per Service Tier. Elastic Database Pools 23

TierMax Pool Size Max DbseDTU pool range Max eDTU/db Max Size / db Basic120GB edtu 52GB Standard1200GB edtu GB Premium750GB edtu GB Database pool specifications 24

One db patternThe pooled pattern Elastic Database Pools 25

Fixed cost per eDTU (min 100, max 1500). Example: 16 S3 databases: 16x$150 per month = $2400, each db has static 100 DTU. 250GBx16 storage. One Standard pool: (800 eDTUx$2.23) per month=$1784, each db can go DTU. 800GB storage. Elastic Database Pools: pricing 26

Create a db pool Demo

Running jobs on an elastic data tier

Allows running jobs against a set of databases. Either a T-SQL script or a DACPAC. Can be a custom set, a shard set or a db pool. Scheduling and retry similar to the SQL Agent. Elastic Database Jobs 29

It’s a customer-hosted Azure solution. Cost is per component. Requires the following components setup during install: Cloud service (worker role to run tasks). SQL Db (control db to store metadata, S0 default). Service bus (used for work coordination). Azure storage (for diagnostic output). Setting up Elastic Database Jobs 30

How do Elastic Database Jobs work? 31 Control DB Controller Job Task Exec Portal/P$ A database set Job info Job tasks Execution and results

Using Elastic db jobs Demo

If you want easy scale out of a.NET app: elastic db tools. If you want to be flexible on resource consumption: elastic database pools. Recap 33

If you want queries that span multiple dbs: elastic db query. If you want to run jobs on 1 to N dbs: elastic database jobs. Recap 34

Q/A

Thank You!