inside sql azure - cihan biyikoglu - sql azure

26
INSIDE SQL AZURE Self Governing, Self-Healing, Massively Scalable Database Service in the Cloud Cihan Biyikoglu Program Manager - SQL Azure

Upload: cihangirb

Post on 24-Jan-2015

802 views

Category:

Documents


2 download

DESCRIPTION

Deep dive into SQL Azure

TRANSCRIPT

Page 1: Inside Sql Azure - Cihan Biyikoglu - SQL Azure

INSIDE SQL AZURESelf Governing, Self-Healing, Massively Scalable Database Service in the Cloud

Cihan BiyikogluProgram Manager - SQL Azure

Page 2: Inside Sql Azure - Cihan Biyikoglu - SQL Azure

MICROSOFT CONF IDENT IAL – INTERNAL ONLY

AGENDA

Inside SQL Azure• SQL Azure = SQL Server + Self Management Services• SQL Azure Arch Components• SQL Azure Maintenance Model• SQL Azure Network Model

• What does this mean for data movement?• What does this mean for perf and scale?• What does this mean for your SQL Server apps?• What does this mean for your apps economics?

Page 3: Inside Sql Azure - Cihan Biyikoglu - SQL Azure

SQL AZURE ARCHITECTURE

Page 4: Inside Sql Azure - Cihan Biyikoglu - SQL Azure

MICROSOFT CONF IDENT IAL – INTERNAL ONLY

SERVICE PROVISIONING MODEL

• Each account has zero or more servers• Azure wide, provisioned in a common portal• Established a Billing instrument

• Each server has one or more databases• Logical concept equal to a master DB• Contains metadata about database & usage• Unit of authentication, geo-location, billing, reporting• Generated DNS-based name

• Each database has standard SQL objects• Users, Tables, Views, Indices, etc• Unit of consistency

Account

Server

Database

Page 5: Inside Sql Azure - Cihan Biyikoglu - SQL Azure

DATACENTER ARCHITECTURE

TOR

LB LBAgg

PDU

LB LBAgg

LB LBAgg

LB LBAgg

LB LBAgg

LB LBAgg

Racks

Datacenter

Routers

Aggregation Routers and

Load Balancers

TOR

PDU

TOR

PDU

TOR

PDU

TOR

PDU

TOR

PDU

TOR

PDU

TOR

PDU

TOR

PDU

TOR

PDU

TOR

PDU

TOR

PDU

TOR

PDU

TOR

PDU

TOR

PDU

……… … …

Top of RackSwitches

Power Distribution

Units

Nodes

Nodes

Nodes

Nodes

Nodes

Nodes

Nodes

Nodes

Nodes

Nodes

Nodes

Nodes

Nodes

Nodes

Nodes

Commodity machines: Economics – HW selected based on price/performance

Page 6: Inside Sql Azure - Cihan Biyikoglu - SQL Azure

MICROSOFT CONF IDENT IAL – INTERNAL ONLY

NETWORK TOPOLOGY

04/10/2023 6

Application

InternetAzure Cloud

LB

TDS/SSL (tcp)

TDS (tcp)

TDS (tcp)

Applications use standard SQL client libraries: ODBC, ADO.Net, …

Load balancer forwards ‘sticky’ sessions to TDS protocol tier

Security Boundary

SQL SQL SQL SQL SQLSQL

Gateway

Gateway

Gateway

Gateway

Gateway

Gateway

Gateway: DaaS protocol gateway, enforces AUTHN/AUTHZ policy; proxy to SQL Azure

Scalability and Availability: Fabric, Failover, Replication, and Load balancing

Page 7: Inside Sql Azure - Cihan Biyikoglu - SQL Azure

SERVICES LAYER - GATEWAY

• Layer of isolation between the backend and customer traffic• Provisioning Billing - Server & Databases• Maps logical objects to physical resources

o Physical location for SQL Azure Servers, User Databases

• Handles login o Negotiates capabilities at PreLogino Encryption (required), MARS

• Inspects TDS packets for G-SQLo G-SQL = T-SQL Commands executed by the Gateway, such as CREATE DATABASE

or CREATE FEDERATION

Page 8: Inside Sql Azure - Cihan Biyikoglu - SQL Azure

MICROSOFT CONF IDENT IAL – INTERNAL ONLY

WALKTHROUGH-SQL AZURE DATABASE PROVISIONING

CREATE DATABASE … (EDITION=‘’, MAXSIZE)

Page 9: Inside Sql Azure - Cihan Biyikoglu - SQL Azure

SQL Azure - Engine Node

CPU

PLATFORM LAYER

• SQL Server Engine = Codebase SQL2012• Multitenant Setup – more details coming…

o Single physical database that contain multiple logical databases with Single log file shared among all logical databases

o Engine Resource Management (throttling) for fairness and protection

Database File Log File TempDB

Page 10: Inside Sql Azure - Cihan Biyikoglu - SQL Azure

PLATFORM LAYER

• SQL Azure Fabric • SLA: Replication with auto-failover

o Service monitoring and health management through ring topology

• Load Balancingo Spread high concentration of load to balance the cluster, improve customer

experience and improve node health

Page 11: Inside Sql Azure - Cihan Biyikoglu - SQL Azure

MICROSOFT CONF IDENT IAL – INTERNAL ONLY

MULTI-TENANCY: RESOURCE MANAGEMENT

• Resource shared on machine with neighbor databases• CPU, memory, data/log spindles• TempDB, worker threads, network• Neighbors activity can affect your DB

• Multi-tenancy management provided in SQL Azureo Load Balancer o Throttling Service

Page 12: Inside Sql Azure - Cihan Biyikoglu - SQL Azure

MICROSOFT CONF IDENT IAL – INTERNAL ONLY

MULTI-TENANCY: LOAD BALANCER

– Balance resource utilization across all machines – Minimize overloaded machines and reduce throttling– Swap vs. move mechanisms– Runs periodically, solves long term imbalance for

cluster– Reactive Load Balancer solves short term spikes» React to spikes before the next regular LB run» Alleviate high throttling occurrences on hot machines

Page 13: Inside Sql Azure - Cihan Biyikoglu - SQL Azure

MICROSOFT CONF IDENT IAL – INTERNAL ONLY

MULTI-TENANCY: RESOURCE THROTTLING

o Throttling Service• Protect a machine from sustained high usage of system resources• Evaluate actual resource usage vs. safe thresholds real-time• Throttle the busiest DBs first (soft throttle)• Throttle every DB if necessary (hard throttle)

o Throttling show as connection error 40501– “The service is currently busy. Retry the request after 10 seconds.

Code: %d.”

Page 14: Inside Sql Azure - Cihan Biyikoglu - SQL Azure

SQL AZURE MAINTENANCE MODEL

Page 15: Inside Sql Azure - Cihan Biyikoglu - SQL Azure

SERVICE UPDATES

• SQL Azure requires no physical management• HW, Networking, OS service packs and patches, SQL Server service

packs or patches are automatically done for you!

• Upgrade are done frequently • Hotfixes, Service Upgrades or Service Releases for

o Sql azure, windows azure, windows server

Page 16: Inside Sql Azure - Cihan Biyikoglu - SQL Azure

MULTI PHASE UPGRADE

• Rollout in pieces• Fault Domains ~= Racks• We upgrade a fault domain at a time

o Fault Domains are considered when placing replicas. o Ensure we take out one replicate of your db at a time down only.

Page 17: Inside Sql Azure - Cihan Biyikoglu - SQL Azure

SQL AZURE NETWORK MODEL

Page 18: Inside Sql Azure - Cihan Biyikoglu - SQL Azure

MICROSOFT AZURE DATA CENTERS WORLD WIDE

Regional hosting locations

200ms Latency from 2 regional hosting locations

South Central

US

North Central US

North Europe

Southeast Asia

West Europe

Hosting locations within 100ms of the customer

At least one hosting location can be reached within 100ms, but not two

No points to test from or greater than 200ms latency

East Asia

Page 19: Inside Sql Azure - Cihan Biyikoglu - SQL Azure

AZURE CROSS DATACENTER LATENCIES

• Client Stats & SQL Ping

From\To (ms)North-central

USSouth-central

USNorth Europe West Europe East Asia

South-East Asia

North-central US

4.2 35.3 97 103.6 190.9 219.7

South-central US

37.8 2.3 111.2 117.5 190 218.6

North Europe 99.8 111.8 2 20.9 283.3 312.3

West Europe 107.5 118.6 21.1 2.3 291.8 320.8

East Asia 194.5 190.8 284.2 291.7 1.6 32.6

South-East Asia

223.1 219.2 312.9 320.1 32.2 1.9

Page 20: Inside Sql Azure - Cihan Biyikoglu - SQL Azure

DATA MOVEMENT PERFORMANCE WITH LATENCY

• If you have bandwidth you can beat latency!

Low Bandwidth, Medium Latency - 114ms

Low Bandwidth, Very High Latency - 289ms

High Bandwidth, High Latency - 169ms

High Bandwidth, Medium Latency - 54ms

0 1000 2000 3000 4000 5000 6000 7000 8000 9000

Parallel Upload Batch Size 1K (sum rows/sec)Native Sorted - Batch 10K (rows/sec)Native - Batch 10K (rows/sec)Native - Batch 100 (rows/sec)

Rows/Sec

Page 21: Inside Sql Azure - Cihan Biyikoglu - SQL Azure

LETS RECAP

Page 22: Inside Sql Azure - Cihan Biyikoglu - SQL Azure

WHAT IS SQL AZURE?

• Database as a Service in the Cloud• Low Maintenance

o Built in HA (SLA of 99.9%), Load Balanced (for db placement)o No Physical Maintenance Required – no wires, no patches for OS or SQL etc

• Best Economicso Optimized for best economics, great price performance and high scaleo Able to achieve all this at a new low price point and with pay as you go model

• Rich Familiar Programming Modelo It is SQL Server at heart!

– Full ACID with Rich server and client side programmability options– Rich ecosystem of tools from BI to 3rd Party Management tools to MSOffice Integration…

Page 23: Inside Sql Azure - Cihan Biyikoglu - SQL Azure

MICROSOFT CONF IDENT IAL – INTERNAL ONLY

TOP ARCHITECTURAL DIFFERENCES

SQL Server SQL Azure

Performance Spectrum of HW choicesNo HA by defaultDedicated setup by defaultTypically low latency access

Locked HW choiceHA and IO latency with 3 copiesMulti-tenant setupCould be high latency to DC

Scale Model Spectrum of HW choiceScale-Up – limited with HW

Locked HW choiceScale-Out with Federations– no practical limits

Economics Per Core or Per Server+CAL

Exponential Cost with Scale-UpHigh Overhead on Admin

Pay As You Go + Elastic

Linear cost with Scale-OutNo Admin Overhead

Page 24: Inside Sql Azure - Cihan Biyikoglu - SQL Azure

TOP APP MODEL DIFFERENCES

• SQL Azure Application Model Difference• Scale-out for scale and perf

o Take advantage of elasticity and get great economicso Take advantage of unlimited scale

• Parallelize for efficiency o Harness many small nodeso Get around both network and disk IO latency

• Code for Failure o Work in smaller transactions – so you can fail small o Integrate retry and resume logic into all operations

Page 25: Inside Sql Azure - Cihan Biyikoglu - SQL Azure

INSIDE SQL AZURE BY CIHAN BIYIKOGLU

Thanks for Attending

Page 26: Inside Sql Azure - Cihan Biyikoglu - SQL Azure

© 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.

The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after

the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.