SlideShare a Scribd company logo
Building a scalable
database solution
with SQL Azure
About me
• Shy Engelberg, CTO @
• Email : Shy@Valinor.co.il
• Phone : 054-771-711-5
• Twitter : @ShyEngelberg
Agenda
• SQL Azure Database
• Intro
• Technical details
• Pricing tiers and performance
• Business continuity
• Elastic Database client library
• Shard management
• data-dependent routing
• cross-shard query capabilities
Microsoft Azure SQL Database
Microsoft Azure SQL Database
• SQL Database is a relational database service in the cloud based on
the market-leading Microsoft SQL Server engine, with mission-critical
capabilities.
SQL Database delivers predictable performance, scalability, business
continuity, data protection, and near-zero administration to cloud
developers and solution architects.
You can focus on rapid app development and accelerating your time
to market, rather than managing virtual machines and infrastructure.
Microsoft Azure SQL Database
• Because it’s based on the SQL Server engine,
Azure SQL Database supports existing SQL Server tools, libraries and
APIs, which makes it easier for you to move and extend to the cloud.
( Using the same TDS interface as regular SQL database)
Microsoft Azure SQL Database
• Based on SQL server technology. (A subset of the product)
• Fully managed service (Microsoft manage it completely!)
• We Don't to think and worry about:
 VMs
 Resources (IO, CPU, Memory)
 Installations, upgrades, patches
 Services
 Files placement
 Transaction log
Availability solutions
Microsoft Azure SQL Database – Server
• The basic unit in Azure that holds DBs is a “server”
• A server is a logical entity used for logical grouping of DBs and security
bounding.
It looks and smell like a server but it's basically only a TDS proxy endpoint.
(For the application it looks like a server (instance))
• When creating it, you are required to provide a unique server name-
(xxxx.database.windows.net).
• The server Initially contains only a master database.
Microsoft Azure SQL Database –DB
Microsoft Azure SQL Database has the following properties:
• Name – of the DB
• Service Tier (Performance Level)
• Max Size
• Collation – for all the tables are columns.
• “Server” – in which group to place the DB
Microsoft Azure SQL Database – service tiers
Azure SQL Database provides multiple service tiers to handle different types of
workloads.
• Performance level – measured by “DTU” (a combination of CPU, IO and log usage)
• Max size
• Point-in-time restore retention
• Parallel connections
• Size – does not include the log file size
You can change service tiers at any time with zero downtime to your application.
(Scale up)
Microsoft Azure SQL Database – service tiers
Basic, Standard, and Premium service tiers all have an uptime SLA of 99.99%
• Basic: Best suited for a small size database, supporting typically one single active
operation at a given time.
(predictable performance hour over hour)
• Standard: The go-to option for most cloud applications, supporting multiple
concurrent queries.
(predictable performance minute over minute)
• Premium: Designed for high transactional volume, supporting a large number of
concurrent users and requiring the highest level of business continuity
capabilities.
(predictable performance second over second)
Microsoft Azure SQL Database – service tiers
• The Database Transaction Unit (DTU) is the unit of measure in SQL
Database that represents the relative power of databases based on a
real-world measure: the database transaction. We took a set of
operations that are typical for an online transaction processing (OLTP)
request, and then measured how many transactions could be
completed per second under fully loaded conditions (that’s the short
version, you can read the gory details in the Benchmark overview).
• A Basic database has 5 DTUs, which means it can complete 5
transactions per second, while a Premium P11 database has 1750
DTUs.
Microsoft Azure SQL Database – service tiers
Microsoft Azure SQL Database
• Create and manage Azure SQL database
DEMO
Microsoft Azure SQL Database – Connection
• The Microsoft Azure SQL Database service is only available with TCP
port 1433. (ensure your firewall allows outgoing TCP communication
on TCP port 1433)
• The protocol is TDS (Tabular Data Stream) protocol over TCP/IP.
• All connections are encrypted - SSL is required - if encryption is not
defined in the connection string, connection will fail.
• Use firewall rules to connect from outside Microsoft data center
Microsoft Azure SQL Database – Connection
• Connect using the server name : xxxx.database.windows.net
• Connection Security is managed by SQL Database Firewall, an IP
Address-based access control for SQL Database
 Rules can be defined at the server level
 No IP authorized by default
 Option to disable/enable access from
applications hosted in Windows Azure:
Azure SQL Database
• Firewall and connection
DEMO
Microsoft Azure SQL Database – Business continuity
• Let’s start from the bottom line:
• SLA is built- in 99.9%.
In opposed to traditional Always-On and failover cluster which
requires a lot of work and money, this solution is cheap and out-of-
the-box.
Microsoft Azure SQL Database – Business continuity
• Business continuity can be affected by one or more of the following
three major categories of issues:
Failure of individual servers, devices or network connectivity
(the disk that my data is on died)
Corruption, unwanted modification or deletion of data
(someone dropped a table or deleted a row)
Widespread loss of datacenter facilities
(Amsterdam is gone)
Microsoft Azure SQL Database – Business continuity
• Protection from Failure of Individual Servers and Devices - High
Availability through Infrastructure Redundancy:
Maintaining multiple (3) copies of all data in different physical nodes
located across fully independent physical sub-systems such as server
racks and network routers.
Microsoft Azure SQL Database – Business continuity
Point-in-time restore, Programmatic “oops recovery” of data deletion
or alteration:
• Auto backups, transactional logs every 5 min
• Backups in Azure Storage and geo-replicated
• Backups retention policy:
Basic, up to 7 days
Standard, up to 14 days
Premium, up to 35 days
Microsoft Azure SQL database - Scaling
Microsoft Azure SQL Database – Elastic tools
• Elastic Database features enables you to use the virtually unlimited
database resources of Azure SQL Database to create solutions for
transactional workloads, and especially Software as a Service (SaaS)
applications.
• Enabling this functionality is facilitated by features such as the elastic
database client library and split-merge tool, known together as
elastic database tools, which simplify building applications that rely
on sharding.
Microsoft Azure SQL Database – Elastic tools
• Elastic Database tools:
simplify development and management of sharded database
solutions. The tools are: the Elastic Database client library and the
Elastic Database split-merge tool.
Microsoft Azure SQL Database – Elastic tools
• Elastic Database pools (preview): A pool is a collection of databases to
which you can add or remove databases at any time. The databases in
the pool share a fixed amount of resources (DTUs).
• Elastic Database jobs (preview): Use jobs to manage large numbers of
Azure SQL databases. Easily perform administrative operations such
as schema changes, credentials management, reference data updates
and more
• Elastic Database query (preview): Enables you to run a Transact-SQL
query that spans multiple databases. This enables connection to
reporting tools such as Excel, PowerBI, Tableau, etc.
Microsoft Azure SQL database – sharding
“A database shard is a horizontal partition of data in a database.”
• Sharding is a technique to distribute large amounts of identically-
structured data across a number of independent databases. It is
especially popular with cloud developers who are creating Software
as a Service (SAAS) offerings for end customers or businesses. These
end customers are often referred to as “Tenants”.
• Sharding works best when every transaction in an application can be
restricted to a single value of a sharding key. That ensures that all
transactions will be local to a specific database.
Microsoft Azure SQL database – scaling out
Elastic Database client library
• The Elastic Database client library helps you easily develop sharded
applications using hundreds—or even thousands—of Azure SQL
databases hosted on Microsoft Azure
• Elastic Database client library is now available as open source
software on GitHub.
• Elastic database client library supports:
Shard management
Data-dependent routing
Multi-shard queries (MSQ)
Elastic Database library – Shard Map Management
• To manage a collection of shards, a special database called the "shard map
manager" is created.
It maintains information allowing an application to connect to the correct
database based upon the value of the sharding key.
• Shard map management is the ability for an application to manage various
metadata about its shards.
• Developers can use this functionality to register databases as shards,
describe mappings of individual sharding keys or key ranges to those
databases.
• Without the elastic database client library, you would need to spend a lot
of time writing the management code when implementing sharding.
Elastic Database library – Shard Map Management
• use the ShardMapManager class, found in the Elastic Database client
library to manage shard maps.
• Elastic Scale support the following .Net Framework types as sharding
keys:
integer
long
guid
byte[]
datetime
timespan
datetimeoffset
Elastic Database library – Shard Map Management
• Shard maps can be constructed using lists of individual sharding key
values, or they can be constructed using ranges of sharding key
values.
• The data managed by a ShardMapManager instance is kept in three
places:
Global Shard Map (GSM): You specify a database to serve as the repository
for all of its shard maps and mappings.
Local Shard Map (LSM): Every database that you specify to be a shard is
modified to contain shard map information.
Application cache
Elastic Database library – Data dependent routing
• Data dependent routing is the ability to use the data in a query to
route the request to an appropriate database. This is a fundamental
pattern when working with sharded databases.
• Each specific query or transaction in an application using data
dependent routing is restricted to accessing a single database per
request.
• the Shard Map Manager opens connections to the correct databases
when needed, based on the data in the shard map and the value of
the sharding key that is the target of the application’s request.
Elastic Database library – Data dependent routing
• The ShardMap.OpenConnectionForKey method returns an ADO.Net
connection ready for issuing commands to the appropriate database
based on the value of the key parameter.
• The OpenConnectionForKey method returns a new already-open
connection to the correct database. Connections utilized in this way
still take full advantage of ADO.Net connection pooling.
Elastic Database library – Multi-shard querying
• Multi-shard querying is used for tasks such as data
collection/reporting that require running a query that stretches
across several shards.
• The main entry point into multi-shard querying is the
MultiShardConnection class.
• myShardMap.GetShards() method retrieves all shards from the shard
map and provides an easy way to run a query across all relevant
databases.
• The collection of shards for a multi-shard query can be refined further
by performing a LINQ query over the collection returned from the call
to myShardMap.GetShards()
Elastic Database library
Working with Elastic database client library
DEMO
Questions?
Thank you
Ad

More Related Content

What's hot (20)

Introduction to azure document db
Introduction to azure document dbIntroduction to azure document db
Introduction to azure document db
Antonios Chatzipavlis
 
Microsoft SQL Family and GDPR
Microsoft SQL Family and GDPRMicrosoft SQL Family and GDPR
Microsoft SQL Family and GDPR
Antonios Chatzipavlis
 
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
Antonios Chatzipavlis
 
Introduction to DataStax Enterprise Graph Database
Introduction to DataStax Enterprise Graph DatabaseIntroduction to DataStax Enterprise Graph Database
Introduction to DataStax Enterprise Graph Database
DataStax Academy
 
Azure Cloud Dev Camp - Introduction
Azure Cloud Dev Camp - IntroductionAzure Cloud Dev Camp - Introduction
Azure Cloud Dev Camp - Introduction
giventocode
 
Using extended events for troubleshooting sql server
Using extended events for troubleshooting sql serverUsing extended events for troubleshooting sql server
Using extended events for troubleshooting sql server
Antonios Chatzipavlis
 
SQL Server 2016 novelties
SQL Server 2016 noveltiesSQL Server 2016 novelties
SQL Server 2016 novelties
MSDEVMTL
 
Introduction to Windows Azure Data Services
Introduction to Windows Azure Data ServicesIntroduction to Windows Azure Data Services
Introduction to Windows Azure Data Services
Robert Greiner
 
Experience SQL Server 2017: The Modern Data Platform
Experience SQL Server 2017: The Modern Data PlatformExperience SQL Server 2017: The Modern Data Platform
Experience SQL Server 2017: The Modern Data Platform
Bob Ward
 
SQL Azure the database in the cloud
SQL Azure the database in the cloud SQL Azure the database in the cloud
SQL Azure the database in the cloud
Eduardo Castro
 
Moving to the cloud; PaaS, IaaS or Managed Instance
Moving to the cloud; PaaS, IaaS or Managed InstanceMoving to the cloud; PaaS, IaaS or Managed Instance
Moving to the cloud; PaaS, IaaS or Managed Instance
Thomas Sykes
 
NoSQL and Couchbase
NoSQL and CouchbaseNoSQL and Couchbase
NoSQL and Couchbase
Sangharsh agarwal
 
Apache Cassandra introduction
Apache Cassandra introductionApache Cassandra introduction
Apache Cassandra introduction
fardinjamshidi
 
Cassandra Community Webinar: From Mongo to Cassandra, Architectural Lessons
Cassandra Community Webinar: From Mongo to Cassandra, Architectural LessonsCassandra Community Webinar: From Mongo to Cassandra, Architectural Lessons
Cassandra Community Webinar: From Mongo to Cassandra, Architectural Lessons
DataStax
 
Sql server hybrid what every sql professional should know
Sql server hybrid what every sql professional should knowSql server hybrid what every sql professional should know
Sql server hybrid what every sql professional should know
Bob Ward
 
What's new in SQL Server 2017
What's new in SQL Server 2017What's new in SQL Server 2017
What's new in SQL Server 2017
Hasan Savran
 
PASS VC: SQL Server Performance Monitoring and Baselining
PASS VC: SQL Server Performance Monitoring and BaseliningPASS VC: SQL Server Performance Monitoring and Baselining
PASS VC: SQL Server Performance Monitoring and Baselining
PARIKSHIT SAVJANI
 
Exploring sql server 2016
Exploring sql server 2016Exploring sql server 2016
Exploring sql server 2016
Antonios Chatzipavlis
 
SQL Server 2017 Enhancements You Need To Know
SQL Server 2017 Enhancements You Need To KnowSQL Server 2017 Enhancements You Need To Know
SQL Server 2017 Enhancements You Need To Know
Quest
 
Keep your environment always on with sql server 2016 sql bits 2017
Keep your environment always on with sql server 2016 sql bits 2017Keep your environment always on with sql server 2016 sql bits 2017
Keep your environment always on with sql server 2016 sql bits 2017
Bob Ward
 
Introduction to DataStax Enterprise Graph Database
Introduction to DataStax Enterprise Graph DatabaseIntroduction to DataStax Enterprise Graph Database
Introduction to DataStax Enterprise Graph Database
DataStax Academy
 
Azure Cloud Dev Camp - Introduction
Azure Cloud Dev Camp - IntroductionAzure Cloud Dev Camp - Introduction
Azure Cloud Dev Camp - Introduction
giventocode
 
Using extended events for troubleshooting sql server
Using extended events for troubleshooting sql serverUsing extended events for troubleshooting sql server
Using extended events for troubleshooting sql server
Antonios Chatzipavlis
 
SQL Server 2016 novelties
SQL Server 2016 noveltiesSQL Server 2016 novelties
SQL Server 2016 novelties
MSDEVMTL
 
Introduction to Windows Azure Data Services
Introduction to Windows Azure Data ServicesIntroduction to Windows Azure Data Services
Introduction to Windows Azure Data Services
Robert Greiner
 
Experience SQL Server 2017: The Modern Data Platform
Experience SQL Server 2017: The Modern Data PlatformExperience SQL Server 2017: The Modern Data Platform
Experience SQL Server 2017: The Modern Data Platform
Bob Ward
 
SQL Azure the database in the cloud
SQL Azure the database in the cloud SQL Azure the database in the cloud
SQL Azure the database in the cloud
Eduardo Castro
 
Moving to the cloud; PaaS, IaaS or Managed Instance
Moving to the cloud; PaaS, IaaS or Managed InstanceMoving to the cloud; PaaS, IaaS or Managed Instance
Moving to the cloud; PaaS, IaaS or Managed Instance
Thomas Sykes
 
Apache Cassandra introduction
Apache Cassandra introductionApache Cassandra introduction
Apache Cassandra introduction
fardinjamshidi
 
Cassandra Community Webinar: From Mongo to Cassandra, Architectural Lessons
Cassandra Community Webinar: From Mongo to Cassandra, Architectural LessonsCassandra Community Webinar: From Mongo to Cassandra, Architectural Lessons
Cassandra Community Webinar: From Mongo to Cassandra, Architectural Lessons
DataStax
 
Sql server hybrid what every sql professional should know
Sql server hybrid what every sql professional should knowSql server hybrid what every sql professional should know
Sql server hybrid what every sql professional should know
Bob Ward
 
What's new in SQL Server 2017
What's new in SQL Server 2017What's new in SQL Server 2017
What's new in SQL Server 2017
Hasan Savran
 
PASS VC: SQL Server Performance Monitoring and Baselining
PASS VC: SQL Server Performance Monitoring and BaseliningPASS VC: SQL Server Performance Monitoring and Baselining
PASS VC: SQL Server Performance Monitoring and Baselining
PARIKSHIT SAVJANI
 
SQL Server 2017 Enhancements You Need To Know
SQL Server 2017 Enhancements You Need To KnowSQL Server 2017 Enhancements You Need To Know
SQL Server 2017 Enhancements You Need To Know
Quest
 
Keep your environment always on with sql server 2016 sql bits 2017
Keep your environment always on with sql server 2016 sql bits 2017Keep your environment always on with sql server 2016 sql bits 2017
Keep your environment always on with sql server 2016 sql bits 2017
Bob Ward
 

Viewers also liked (14)

Agenda setmana 49 -desembre-curs16-17
Agenda setmana 49 -desembre-curs16-17Agenda setmana 49 -desembre-curs16-17
Agenda setmana 49 -desembre-curs16-17
6sise
 
La Experiencia del Gobierno de Guadalajara - Mario Ramón Silva
La Experiencia del Gobierno de Guadalajara - Mario Ramón SilvaLa Experiencia del Gobierno de Guadalajara - Mario Ramón Silva
La Experiencia del Gobierno de Guadalajara - Mario Ramón Silva
Fagner Glinski
 
Voltaire y vico
Voltaire y vicoVoltaire y vico
Voltaire y vico
Jose Villalta
 
Lakhbinder Singh Info - Nov 2016
Lakhbinder Singh Info - Nov 2016Lakhbinder Singh Info - Nov 2016
Lakhbinder Singh Info - Nov 2016
LAKHBINDER SINGH
 
Biologia marcos
Biologia marcosBiologia marcos
Biologia marcos
marcosgarciatic
 
Nâng cao hiệu quả sử dụng tài sản tại công ty cổ phần liên doanh htc
Nâng cao hiệu quả sử dụng tài sản tại công ty cổ phần liên doanh htcNâng cao hiệu quả sử dụng tài sản tại công ty cổ phần liên doanh htc
Nâng cao hiệu quả sử dụng tài sản tại công ty cổ phần liên doanh htc
https://www.facebook.com/garmentspace
 
Preventing cyber bullying presentation
Preventing cyber bullying presentationPreventing cyber bullying presentation
Preventing cyber bullying presentation
smithmpa
 
Andri Yulianto 2016
Andri Yulianto 2016Andri Yulianto 2016
Andri Yulianto 2016
ANDRI YULIANTO
 
Первая неотложная помощь
Первая неотложная помощьПервая неотложная помощь
Первая неотложная помощь
Ларисаа Дворжецкая
 
Полянская Е. Ю.
Полянская Е. Ю.Полянская Е. Ю.
Полянская Е. Ю.
Ларисаа Дворжецкая
 
Поздравительные открытки
Поздравительные открыткиПоздравительные открытки
Поздравительные открытки
Ларисаа Дворжецкая
 
Truss
Truss  Truss
Truss
Prem Kumar Soni
 
Database analysis & pivot table
Database analysis & pivot tableDatabase analysis & pivot table
Database analysis & pivot table
smittichai chaiyawong
 
Ad

Similar to Scalable relational database with SQL Azure (20)

Azure data platform overview
Azure data platform overviewAzure data platform overview
Azure data platform overview
Alessandro Melchiori
 
AZURE Data Related Services
AZURE Data Related ServicesAZURE Data Related Services
AZURE Data Related Services
Ruslan Drahomeretskyy
 
Tech-Spark: Azure SQL Databases
Tech-Spark: Azure SQL DatabasesTech-Spark: Azure SQL Databases
Tech-Spark: Azure SQL Databases
Ralph Attard
 
Azure SQL Database
Azure SQL Database Azure SQL Database
Azure SQL Database
nj-azure
 
Azure from scratch part 3 By Girish Kalamati
Azure from scratch part 3 By Girish KalamatiAzure from scratch part 3 By Girish Kalamati
Azure from scratch part 3 By Girish Kalamati
Girish Kalamati
 
Introducing Azure SQL Data Warehouse
Introducing Azure SQL Data WarehouseIntroducing Azure SQL Data Warehouse
Introducing Azure SQL Data Warehouse
James Serra
 
Azure Synapse Analytics Overview (r2)
Azure Synapse Analytics Overview (r2)Azure Synapse Analytics Overview (r2)
Azure Synapse Analytics Overview (r2)
James Serra
 
Ralph Kemperdick – IT-Tage 2015 – Microsoft Azure als Datenplattform
Ralph Kemperdick – IT-Tage 2015 – Microsoft Azure als DatenplattformRalph Kemperdick – IT-Tage 2015 – Microsoft Azure als Datenplattform
Ralph Kemperdick – IT-Tage 2015 – Microsoft Azure als Datenplattform
Informatik Aktuell
 
Azure SQL Database
Azure SQL DatabaseAzure SQL Database
Azure SQL Database
Palash Debnath
 
autonomous-database-100.pdf
autonomous-database-100.pdfautonomous-database-100.pdf
autonomous-database-100.pdf
TrLuNguyn
 
Azure - Data Platform
Azure - Data PlatformAzure - Data Platform
Azure - Data Platform
giventocode
 
Azure SQL
Azure SQLAzure SQL
Azure SQL
GlobalLogic Ukraine
 
UCT AWS_IOT
UCT AWS_IOTUCT AWS_IOT
UCT AWS_IOT
uniconvergetechnologies
 
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
Pushkar Chivate
 
Afternoons with Azure - Azure Data Services
Afternoons with Azure - Azure Data ServicesAfternoons with Azure - Azure Data Services
Afternoons with Azure - Azure Data Services
CCG
 
CC -Unit4.pptx
CC -Unit4.pptxCC -Unit4.pptx
CC -Unit4.pptx
Revathiparamanathan
 
A Tour of Azure SQL Databases (NOVA SQL UG 2020)
A Tour of Azure SQL Databases  (NOVA SQL UG 2020)A Tour of Azure SQL Databases  (NOVA SQL UG 2020)
A Tour of Azure SQL Databases (NOVA SQL UG 2020)
Timothy McAliley
 
Modern ETL: Azure Data Factory, Data Lake, and SQL Database
Modern ETL: Azure Data Factory, Data Lake, and SQL DatabaseModern ETL: Azure Data Factory, Data Lake, and SQL Database
Modern ETL: Azure Data Factory, Data Lake, and SQL Database
Eric Bragas
 
J1 T1 3 - Azure Data Lake store & analytics 101 - Kenneth M. Nielsen
J1 T1 3 - Azure Data Lake store & analytics 101 - Kenneth M. NielsenJ1 T1 3 - Azure Data Lake store & analytics 101 - Kenneth M. Nielsen
J1 T1 3 - Azure Data Lake store & analytics 101 - Kenneth M. Nielsen
MS Cloud Summit
 
Azure basics
Azure basicsAzure basics
Azure basics
Jitendra Soni
 
Tech-Spark: Azure SQL Databases
Tech-Spark: Azure SQL DatabasesTech-Spark: Azure SQL Databases
Tech-Spark: Azure SQL Databases
Ralph Attard
 
Azure SQL Database
Azure SQL Database Azure SQL Database
Azure SQL Database
nj-azure
 
Azure from scratch part 3 By Girish Kalamati
Azure from scratch part 3 By Girish KalamatiAzure from scratch part 3 By Girish Kalamati
Azure from scratch part 3 By Girish Kalamati
Girish Kalamati
 
Introducing Azure SQL Data Warehouse
Introducing Azure SQL Data WarehouseIntroducing Azure SQL Data Warehouse
Introducing Azure SQL Data Warehouse
James Serra
 
Azure Synapse Analytics Overview (r2)
Azure Synapse Analytics Overview (r2)Azure Synapse Analytics Overview (r2)
Azure Synapse Analytics Overview (r2)
James Serra
 
Ralph Kemperdick – IT-Tage 2015 – Microsoft Azure als Datenplattform
Ralph Kemperdick – IT-Tage 2015 – Microsoft Azure als DatenplattformRalph Kemperdick – IT-Tage 2015 – Microsoft Azure als Datenplattform
Ralph Kemperdick – IT-Tage 2015 – Microsoft Azure als Datenplattform
Informatik Aktuell
 
autonomous-database-100.pdf
autonomous-database-100.pdfautonomous-database-100.pdf
autonomous-database-100.pdf
TrLuNguyn
 
Azure - Data Platform
Azure - Data PlatformAzure - Data Platform
Azure - Data Platform
giventocode
 
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
Pushkar Chivate
 
Afternoons with Azure - Azure Data Services
Afternoons with Azure - Azure Data ServicesAfternoons with Azure - Azure Data Services
Afternoons with Azure - Azure Data Services
CCG
 
A Tour of Azure SQL Databases (NOVA SQL UG 2020)
A Tour of Azure SQL Databases  (NOVA SQL UG 2020)A Tour of Azure SQL Databases  (NOVA SQL UG 2020)
A Tour of Azure SQL Databases (NOVA SQL UG 2020)
Timothy McAliley
 
Modern ETL: Azure Data Factory, Data Lake, and SQL Database
Modern ETL: Azure Data Factory, Data Lake, and SQL DatabaseModern ETL: Azure Data Factory, Data Lake, and SQL Database
Modern ETL: Azure Data Factory, Data Lake, and SQL Database
Eric Bragas
 
J1 T1 3 - Azure Data Lake store & analytics 101 - Kenneth M. Nielsen
J1 T1 3 - Azure Data Lake store & analytics 101 - Kenneth M. NielsenJ1 T1 3 - Azure Data Lake store & analytics 101 - Kenneth M. Nielsen
J1 T1 3 - Azure Data Lake store & analytics 101 - Kenneth M. Nielsen
MS Cloud Summit
 
Ad

Recently uploaded (20)

What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
"Rebranding for Growth", Anna Velykoivanenko
"Rebranding for Growth", Anna Velykoivanenko"Rebranding for Growth", Anna Velykoivanenko
"Rebranding for Growth", Anna Velykoivanenko
Fwdays
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Hands On: Create a Lightning Aura Component with force:RecordData
Hands On: Create a Lightning Aura Component with force:RecordDataHands On: Create a Lightning Aura Component with force:RecordData
Hands On: Create a Lightning Aura Component with force:RecordData
Lynda Kane
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Rock, Paper, Scissors: An Apex Map Learning Journey
Rock, Paper, Scissors: An Apex Map Learning JourneyRock, Paper, Scissors: An Apex Map Learning Journey
Rock, Paper, Scissors: An Apex Map Learning Journey
Lynda Kane
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018
#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018
#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018
Lynda Kane
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
Network Security. Different aspects of Network Security.
Network Security. Different aspects of Network Security.Network Security. Different aspects of Network Security.
Network Security. Different aspects of Network Security.
gregtap1
 
Salesforce AI Associate 2 of 2 Certification.docx
Salesforce AI Associate 2 of 2 Certification.docxSalesforce AI Associate 2 of 2 Certification.docx
Salesforce AI Associate 2 of 2 Certification.docx
José Enrique López Rivera
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Automation Dreamin': Capture User Feedback From Anywhere
Automation Dreamin': Capture User Feedback From AnywhereAutomation Dreamin': Capture User Feedback From Anywhere
Automation Dreamin': Capture User Feedback From Anywhere
Lynda Kane
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
"Rebranding for Growth", Anna Velykoivanenko
"Rebranding for Growth", Anna Velykoivanenko"Rebranding for Growth", Anna Velykoivanenko
"Rebranding for Growth", Anna Velykoivanenko
Fwdays
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Hands On: Create a Lightning Aura Component with force:RecordData
Hands On: Create a Lightning Aura Component with force:RecordDataHands On: Create a Lightning Aura Component with force:RecordData
Hands On: Create a Lightning Aura Component with force:RecordData
Lynda Kane
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Rock, Paper, Scissors: An Apex Map Learning Journey
Rock, Paper, Scissors: An Apex Map Learning JourneyRock, Paper, Scissors: An Apex Map Learning Journey
Rock, Paper, Scissors: An Apex Map Learning Journey
Lynda Kane
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018
#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018
#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018
Lynda Kane
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
Network Security. Different aspects of Network Security.
Network Security. Different aspects of Network Security.Network Security. Different aspects of Network Security.
Network Security. Different aspects of Network Security.
gregtap1
 
Salesforce AI Associate 2 of 2 Certification.docx
Salesforce AI Associate 2 of 2 Certification.docxSalesforce AI Associate 2 of 2 Certification.docx
Salesforce AI Associate 2 of 2 Certification.docx
José Enrique López Rivera
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Automation Dreamin': Capture User Feedback From Anywhere
Automation Dreamin': Capture User Feedback From AnywhereAutomation Dreamin': Capture User Feedback From Anywhere
Automation Dreamin': Capture User Feedback From Anywhere
Lynda Kane
 

Scalable relational database with SQL Azure

  • 1. Building a scalable database solution with SQL Azure
  • 2. About me • Shy Engelberg, CTO @ • Email : [email protected] • Phone : 054-771-711-5 • Twitter : @ShyEngelberg
  • 3. Agenda • SQL Azure Database • Intro • Technical details • Pricing tiers and performance • Business continuity • Elastic Database client library • Shard management • data-dependent routing • cross-shard query capabilities
  • 5. Microsoft Azure SQL Database • SQL Database is a relational database service in the cloud based on the market-leading Microsoft SQL Server engine, with mission-critical capabilities. SQL Database delivers predictable performance, scalability, business continuity, data protection, and near-zero administration to cloud developers and solution architects. You can focus on rapid app development and accelerating your time to market, rather than managing virtual machines and infrastructure.
  • 6. Microsoft Azure SQL Database • Because it’s based on the SQL Server engine, Azure SQL Database supports existing SQL Server tools, libraries and APIs, which makes it easier for you to move and extend to the cloud. ( Using the same TDS interface as regular SQL database)
  • 7. Microsoft Azure SQL Database • Based on SQL server technology. (A subset of the product) • Fully managed service (Microsoft manage it completely!) • We Don't to think and worry about:  VMs  Resources (IO, CPU, Memory)  Installations, upgrades, patches  Services  Files placement  Transaction log Availability solutions
  • 8. Microsoft Azure SQL Database – Server • The basic unit in Azure that holds DBs is a “server” • A server is a logical entity used for logical grouping of DBs and security bounding. It looks and smell like a server but it's basically only a TDS proxy endpoint. (For the application it looks like a server (instance)) • When creating it, you are required to provide a unique server name- (xxxx.database.windows.net). • The server Initially contains only a master database.
  • 9. Microsoft Azure SQL Database –DB Microsoft Azure SQL Database has the following properties: • Name – of the DB • Service Tier (Performance Level) • Max Size • Collation – for all the tables are columns. • “Server” – in which group to place the DB
  • 10. Microsoft Azure SQL Database – service tiers Azure SQL Database provides multiple service tiers to handle different types of workloads. • Performance level – measured by “DTU” (a combination of CPU, IO and log usage) • Max size • Point-in-time restore retention • Parallel connections • Size – does not include the log file size You can change service tiers at any time with zero downtime to your application. (Scale up)
  • 11. Microsoft Azure SQL Database – service tiers Basic, Standard, and Premium service tiers all have an uptime SLA of 99.99% • Basic: Best suited for a small size database, supporting typically one single active operation at a given time. (predictable performance hour over hour) • Standard: The go-to option for most cloud applications, supporting multiple concurrent queries. (predictable performance minute over minute) • Premium: Designed for high transactional volume, supporting a large number of concurrent users and requiring the highest level of business continuity capabilities. (predictable performance second over second)
  • 12. Microsoft Azure SQL Database – service tiers • The Database Transaction Unit (DTU) is the unit of measure in SQL Database that represents the relative power of databases based on a real-world measure: the database transaction. We took a set of operations that are typical for an online transaction processing (OLTP) request, and then measured how many transactions could be completed per second under fully loaded conditions (that’s the short version, you can read the gory details in the Benchmark overview). • A Basic database has 5 DTUs, which means it can complete 5 transactions per second, while a Premium P11 database has 1750 DTUs.
  • 13. Microsoft Azure SQL Database – service tiers
  • 14. Microsoft Azure SQL Database • Create and manage Azure SQL database DEMO
  • 15. Microsoft Azure SQL Database – Connection • The Microsoft Azure SQL Database service is only available with TCP port 1433. (ensure your firewall allows outgoing TCP communication on TCP port 1433) • The protocol is TDS (Tabular Data Stream) protocol over TCP/IP. • All connections are encrypted - SSL is required - if encryption is not defined in the connection string, connection will fail. • Use firewall rules to connect from outside Microsoft data center
  • 16. Microsoft Azure SQL Database – Connection • Connect using the server name : xxxx.database.windows.net • Connection Security is managed by SQL Database Firewall, an IP Address-based access control for SQL Database  Rules can be defined at the server level  No IP authorized by default  Option to disable/enable access from applications hosted in Windows Azure:
  • 17. Azure SQL Database • Firewall and connection DEMO
  • 18. Microsoft Azure SQL Database – Business continuity • Let’s start from the bottom line: • SLA is built- in 99.9%. In opposed to traditional Always-On and failover cluster which requires a lot of work and money, this solution is cheap and out-of- the-box.
  • 19. Microsoft Azure SQL Database – Business continuity • Business continuity can be affected by one or more of the following three major categories of issues: Failure of individual servers, devices or network connectivity (the disk that my data is on died) Corruption, unwanted modification or deletion of data (someone dropped a table or deleted a row) Widespread loss of datacenter facilities (Amsterdam is gone)
  • 20. Microsoft Azure SQL Database – Business continuity • Protection from Failure of Individual Servers and Devices - High Availability through Infrastructure Redundancy: Maintaining multiple (3) copies of all data in different physical nodes located across fully independent physical sub-systems such as server racks and network routers.
  • 21. Microsoft Azure SQL Database – Business continuity Point-in-time restore, Programmatic “oops recovery” of data deletion or alteration: • Auto backups, transactional logs every 5 min • Backups in Azure Storage and geo-replicated • Backups retention policy: Basic, up to 7 days Standard, up to 14 days Premium, up to 35 days
  • 22. Microsoft Azure SQL database - Scaling
  • 23. Microsoft Azure SQL Database – Elastic tools • Elastic Database features enables you to use the virtually unlimited database resources of Azure SQL Database to create solutions for transactional workloads, and especially Software as a Service (SaaS) applications. • Enabling this functionality is facilitated by features such as the elastic database client library and split-merge tool, known together as elastic database tools, which simplify building applications that rely on sharding.
  • 24. Microsoft Azure SQL Database – Elastic tools • Elastic Database tools: simplify development and management of sharded database solutions. The tools are: the Elastic Database client library and the Elastic Database split-merge tool.
  • 25. Microsoft Azure SQL Database – Elastic tools • Elastic Database pools (preview): A pool is a collection of databases to which you can add or remove databases at any time. The databases in the pool share a fixed amount of resources (DTUs). • Elastic Database jobs (preview): Use jobs to manage large numbers of Azure SQL databases. Easily perform administrative operations such as schema changes, credentials management, reference data updates and more • Elastic Database query (preview): Enables you to run a Transact-SQL query that spans multiple databases. This enables connection to reporting tools such as Excel, PowerBI, Tableau, etc.
  • 26. Microsoft Azure SQL database – sharding “A database shard is a horizontal partition of data in a database.” • Sharding is a technique to distribute large amounts of identically- structured data across a number of independent databases. It is especially popular with cloud developers who are creating Software as a Service (SAAS) offerings for end customers or businesses. These end customers are often referred to as “Tenants”. • Sharding works best when every transaction in an application can be restricted to a single value of a sharding key. That ensures that all transactions will be local to a specific database.
  • 27. Microsoft Azure SQL database – scaling out
  • 28. Elastic Database client library • The Elastic Database client library helps you easily develop sharded applications using hundreds—or even thousands—of Azure SQL databases hosted on Microsoft Azure • Elastic Database client library is now available as open source software on GitHub. • Elastic database client library supports: Shard management Data-dependent routing Multi-shard queries (MSQ)
  • 29. Elastic Database library – Shard Map Management • To manage a collection of shards, a special database called the "shard map manager" is created. It maintains information allowing an application to connect to the correct database based upon the value of the sharding key. • Shard map management is the ability for an application to manage various metadata about its shards. • Developers can use this functionality to register databases as shards, describe mappings of individual sharding keys or key ranges to those databases. • Without the elastic database client library, you would need to spend a lot of time writing the management code when implementing sharding.
  • 30. Elastic Database library – Shard Map Management • use the ShardMapManager class, found in the Elastic Database client library to manage shard maps. • Elastic Scale support the following .Net Framework types as sharding keys: integer long guid byte[] datetime timespan datetimeoffset
  • 31. Elastic Database library – Shard Map Management • Shard maps can be constructed using lists of individual sharding key values, or they can be constructed using ranges of sharding key values. • The data managed by a ShardMapManager instance is kept in three places: Global Shard Map (GSM): You specify a database to serve as the repository for all of its shard maps and mappings. Local Shard Map (LSM): Every database that you specify to be a shard is modified to contain shard map information. Application cache
  • 32. Elastic Database library – Data dependent routing • Data dependent routing is the ability to use the data in a query to route the request to an appropriate database. This is a fundamental pattern when working with sharded databases. • Each specific query or transaction in an application using data dependent routing is restricted to accessing a single database per request. • the Shard Map Manager opens connections to the correct databases when needed, based on the data in the shard map and the value of the sharding key that is the target of the application’s request.
  • 33. Elastic Database library – Data dependent routing • The ShardMap.OpenConnectionForKey method returns an ADO.Net connection ready for issuing commands to the appropriate database based on the value of the key parameter. • The OpenConnectionForKey method returns a new already-open connection to the correct database. Connections utilized in this way still take full advantage of ADO.Net connection pooling.
  • 34. Elastic Database library – Multi-shard querying • Multi-shard querying is used for tasks such as data collection/reporting that require running a query that stretches across several shards. • The main entry point into multi-shard querying is the MultiShardConnection class. • myShardMap.GetShards() method retrieves all shards from the shard map and provides an easy way to run a query across all relevant databases. • The collection of shards for a multi-shard query can be refined further by performing a LINQ query over the collection returned from the call to myShardMap.GetShards()
  • 35. Elastic Database library Working with Elastic database client library DEMO

Editor's Notes

  • #3: Been around for more than 10 years…. Bla bla bla
  • #8: It gets features a lot before the boxed product receives them.
  • #9: It's basically routes your connection to the physical location of the primary replica.
  • #15: Create a DB, create in already existing server (Selaopenhouse), choose a low pricing tier, create a sample DB. Change the firewall setting of the already existing AdventureWorks DB (on Selaopenhouse server). connect using visual studio and using management studio.
  • #18: Create a DB, create in already existing server (Selaopenhouse), choose a low pricing tier, create a sample DB. Change the firewall setting of the already existing AdventureWorks DB (on Selaopenhouse server). connect using visual studio and using management studio.
  • #21: Azure SQL Database has a built-in high availability subsystem that protects your database from failures of individual servers and devices mitigates outages due to failures of individual server components, such as hard drives, network interface adapters, or even entire servers. Data durability and fault tolerance is enhanced by
  • #27: multi-tenant sharding, the rows in the database tables are all designed to carry a key identifying the tenant ID or sharding key. Again, the application tier is responsible for routing a tenant’s request to the appropriate database, and this can be supported by the elastic database client library. In addition, row-level security can be used to filter which rows each tenant can access
  • #36: Create a pool through the portal, show shards management table (script) and concepts, and some client code example: <Explain the story behind the demo> Insert data in a specific shard query, Show the data in the DB, Show a multi shard query to retrieve the customers.