SlideShare una empresa de Scribd logo
1 de 36
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

Más contenido relacionado

La actualidad más candente

Introduction to DataStax Enterprise Graph Database
Introduction to DataStax Enterprise Graph DatabaseIntroduction to DataStax Enterprise Graph Database
Introduction to DataStax Enterprise Graph DatabaseDataStax Academy
 
Azure Cloud Dev Camp - Introduction
Azure Cloud Dev Camp - IntroductionAzure Cloud Dev Camp - Introduction
Azure Cloud Dev Camp - Introductiongiventocode
 
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 serverAntonios Chatzipavlis
 
SQL Server 2016 novelties
SQL Server 2016 noveltiesSQL Server 2016 novelties
SQL Server 2016 noveltiesMSDEVMTL
 
Introduction to Windows Azure Data Services
Introduction to Windows Azure Data ServicesIntroduction to Windows Azure Data Services
Introduction to Windows Azure Data ServicesRobert 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 PlatformBob 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 InstanceThomas Sykes
 
Apache Cassandra introduction
Apache Cassandra introductionApache Cassandra introduction
Apache Cassandra introductionfardinjamshidi
 
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 LessonsDataStax
 
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 knowBob 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 2017Hasan 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 BaseliningPARIKSHIT 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 KnowQuest
 
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 2017Bob Ward
 

La actualidad más candente (20)

Introduction to azure document db
Introduction to azure document dbIntroduction to azure document db
Introduction to azure document db
 
Microsoft SQL Family and GDPR
Microsoft SQL Family and GDPRMicrosoft SQL Family and GDPR
Microsoft SQL Family and GDPR
 
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
 
Introduction to DataStax Enterprise Graph Database
Introduction to DataStax Enterprise Graph DatabaseIntroduction to DataStax Enterprise Graph Database
Introduction to DataStax Enterprise Graph Database
 
Azure Cloud Dev Camp - Introduction
Azure Cloud Dev Camp - IntroductionAzure Cloud Dev Camp - Introduction
Azure Cloud Dev Camp - Introduction
 
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
 
SQL Server 2016 novelties
SQL Server 2016 noveltiesSQL Server 2016 novelties
SQL Server 2016 novelties
 
Introduction to Windows Azure Data Services
Introduction to Windows Azure Data ServicesIntroduction to Windows Azure Data Services
Introduction to Windows Azure Data Services
 
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
 
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
 
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
 
NoSQL and Couchbase
NoSQL and CouchbaseNoSQL and Couchbase
NoSQL and Couchbase
 
Apache Cassandra introduction
Apache Cassandra introductionApache Cassandra introduction
Apache Cassandra introduction
 
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
 
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
 
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
 
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
 
Exploring sql server 2016
Exploring sql server 2016Exploring sql server 2016
Exploring sql server 2016
 
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
 
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
 

Destacado

Agenda setmana 49 -desembre-curs16-17
Agenda setmana 49 -desembre-curs16-17Agenda setmana 49 -desembre-curs16-17
Agenda setmana 49 -desembre-curs16-176sise
 
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 SilvaFagner Glinski
 
Lakhbinder Singh Info - Nov 2016
Lakhbinder Singh Info - Nov 2016Lakhbinder Singh Info - Nov 2016
Lakhbinder Singh Info - Nov 2016LAKHBINDER SINGH
 
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 htchttps://www.facebook.com/garmentspace
 
Preventing cyber bullying presentation
Preventing cyber bullying presentationPreventing cyber bullying presentation
Preventing cyber bullying presentationsmithmpa
 

Destacado (14)

Agenda setmana 49 -desembre-curs16-17
Agenda setmana 49 -desembre-curs16-17Agenda setmana 49 -desembre-curs16-17
Agenda setmana 49 -desembre-curs16-17
 
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
 
Voltaire y vico
Voltaire y vicoVoltaire y vico
Voltaire y vico
 
Lakhbinder Singh Info - Nov 2016
Lakhbinder Singh Info - Nov 2016Lakhbinder Singh Info - Nov 2016
Lakhbinder Singh Info - Nov 2016
 
Biologia marcos
Biologia marcosBiologia marcos
Biologia marcos
 
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
 
Preventing cyber bullying presentation
Preventing cyber bullying presentationPreventing cyber bullying presentation
Preventing cyber bullying presentation
 
Andri Yulianto 2016
Andri Yulianto 2016Andri Yulianto 2016
Andri Yulianto 2016
 
Project Presentation
Project  PresentationProject  Presentation
Project Presentation
 
Первая неотложная помощь
Первая неотложная помощьПервая неотложная помощь
Первая неотложная помощь
 
Полянская Е. Ю.
Полянская Е. Ю.Полянская Е. Ю.
Полянская Е. Ю.
 
Поздравительные открытки
Поздравительные открыткиПоздравительные открытки
Поздравительные открытки
 
Truss
Truss  Truss
Truss
 
Database analysis & pivot table
Database analysis & pivot tableDatabase analysis & pivot table
Database analysis & pivot table
 

Similar a Scalable relational database with SQL Azure

Tech-Spark: Azure SQL Databases
Tech-Spark: Azure SQL DatabasesTech-Spark: Azure SQL Databases
Tech-Spark: Azure SQL DatabasesRalph 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 KalamatiGirish Kalamati
 
Introducing Azure SQL Data Warehouse
Introducing Azure SQL Data WarehouseIntroducing Azure SQL Data Warehouse
Introducing Azure SQL Data WarehouseJames 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 DatenplattformInformatik Aktuell
 
autonomous-database-100.pdf
autonomous-database-100.pdfautonomous-database-100.pdf
autonomous-database-100.pdfTrLuNguyn
 
Azure - Data Platform
Azure - Data PlatformAzure - Data Platform
Azure - Data Platformgiventocode
 
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 toolsPushkar Chivate
 
Afternoons with Azure - Azure Data Services
Afternoons with Azure - Azure Data ServicesAfternoons with Azure - Azure Data Services
Afternoons with Azure - Azure Data ServicesCCG
 
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 DatabaseEric 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. NielsenMS Cloud Summit
 

Similar a Scalable relational database with SQL Azure (20)

Azure data platform overview
Azure data platform overviewAzure data platform overview
Azure data platform overview
 
AZURE Data Related Services
AZURE Data Related ServicesAZURE Data Related Services
AZURE Data Related Services
 
Tech-Spark: Azure SQL Databases
Tech-Spark: Azure SQL DatabasesTech-Spark: Azure SQL Databases
Tech-Spark: Azure SQL Databases
 
Azure SQL Database
Azure SQL Database Azure SQL Database
Azure SQL Database
 
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
 
Introducing Azure SQL Data Warehouse
Introducing Azure SQL Data WarehouseIntroducing Azure SQL Data Warehouse
Introducing Azure SQL Data Warehouse
 
Azure Synapse Analytics Overview (r2)
Azure Synapse Analytics Overview (r2)Azure Synapse Analytics Overview (r2)
Azure Synapse Analytics Overview (r2)
 
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
 
Azure SQL Database
Azure SQL DatabaseAzure SQL Database
Azure SQL Database
 
autonomous-database-100.pdf
autonomous-database-100.pdfautonomous-database-100.pdf
autonomous-database-100.pdf
 
Azure - Data Platform
Azure - Data PlatformAzure - Data Platform
Azure - Data Platform
 
Azure SQL
Azure SQLAzure SQL
Azure SQL
 
UCT AWS_IOT
UCT AWS_IOTUCT AWS_IOT
UCT AWS_IOT
 
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
 
Afternoons with Azure - Azure Data Services
Afternoons with Azure - Azure Data ServicesAfternoons with Azure - Azure Data Services
Afternoons with Azure - Azure Data Services
 
CC -Unit4.pptx
CC -Unit4.pptxCC -Unit4.pptx
CC -Unit4.pptx
 
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)
 
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
 
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
 
Azure basics
Azure basicsAzure basics
Azure basics
 

Último

Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 

Último (20)

Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 

Scalable relational database with SQL Azure

  • 1. Building a scalable database solution with SQL Azure
  • 2. About me • Shy Engelberg, CTO @ • Email : Shy@Valinor.co.il • 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

Notas del editor

  1. Been around for more than 10 years…. Bla bla bla
  2. It gets features a lot before the boxed product receives them.
  3. It's basically routes your connection to the physical location of the primary replica.
  4. 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.
  5. 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.
  6. 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
  7. 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
  8. 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.