SlideShare a Scribd company logo
Multi tenancy
Options on Azure
Himanshu Desai
Principal Consultant & Technical Specialist
1
Page
Agenda
› General Architecture
› Concerns when developing for cloud
› Single vs Multi-tenancy
› Recommended approach
/ Copyright ©2014 by Readify Pty Ltd2
Developing for
Cloud
Page
Developing for Cloud Concerns ….
› Backup and restore policy
› Monitoring
› Resiliency
› Physical access to machine
/ Copyright ©2014 by Readify Pty Ltd4
Multi tenancy
Page
Why multi tenancy
› Subscriptionmodeliseasytodevelop
› ReduceOperatingcost
› Supportmoreclientswithlessresources
› Createnewmodelsforrevenuegeneration
/ Copyright ©2014 by Readify Pty Ltd6
PagePage / Copyright ©2014 by Readify Pty Ltd7
Database
Each Tenant
gets their own
portion of the
database based
on the primary
key
Traditional Multi-tenancy approach
Tenant 1Tenant 2Tenant 3
Page
Traditional Single Multi-tenant DB
/ Copyright ©2014 by Readify Pty Ltd8
TenantID PatientName DoctorName Field1 Field2
1 John Dr Cooper Consulte
d
3 Mark Dr Antonio N/A Yes
5 Paul Dr Smith Consulte
d
???
3 Tom Dr Bennett N/A Thanks
Page
Problems
› Noisyneighbourproblem
› Everyonemustupgradeallthelayersatthesametime
› Bigbang–risky
› Cannoteasilyexportdataout
/ Copyright ©2014 by Readify Pty Ltd9
PagePage
Web Browser
JavaScript
Application
Phone/Tablet
Native
Apps
Cloud based Multi tenancy
ASP.NET
Server Code
Web Sites
Request
Response
DB
DB
DB
S
Q
L
A
z
u
r
e
Page
Single vs Multi-Tenant
/ Copyright ©2014 by Readify Pty Ltd11
Page
Important Points
› Scalingasingledatabasecanbedoneeasily
› Finegraincontrolonupgrade
› Lessrisky–cantestafeatureonalimitedsetofclients
› Versioningandupgradeiseasy
› Easytosupport
› Caneasilyexportdata
› Expensivecomparedtosingledatabase
/ Copyright ©2014 by Readify Pty Ltd12
SQL Azure (Quick
Overview)
Page / Copyright ©2015 by Readify Pty Ltd14
DB
SQL
DB
SQL
DB
SQL
App
SQL Azure
Page
Features
› Databaseasaservice
› ElasticScale withSharding*
› Predicatableperformance
› AvailabilitybackedbyreplicaandSLA
› Dataprotectionviaauditing,restoreandgeo-replication
› Selfmanaged
› Threereplicaarerunningatonetime(oneprimaryandtwoormoreseconday)
› Availabilityin3Models:Basic(2GB),Standard(250GB)&Premium(500GB)
› AlsointroducingElasticDatabase(inpreview)
/ Copyright ©2014 by Readify Pty Ltd15
Page
Sharding – Why?
› Thetotalamountofdataistoolargetofitwithintheconstraintsofasingledatabase
› Thetransactionthroughputoftheoverallworkloadexceedsthecapabilitiesofasingle
database
› Tenantsmayrequirephysicalisolationfromeachother,soseparatedatabasesareneeded
foreachtenant
› Differentsectionsofadatabasemayneedtoresideindifferentgeographiesfor
compliance,performanceorgeopoliticalreasons.
/ Copyright ©2014 by Readify Pty Ltd16
Page
Horizontal Vs Vertical Scaling
/ Copyright ©2014 by Readify Pty Ltd17
Page
Challenges
› NoteverythingyoudoinSQLStandardissupportedinSQLAzure
› Yourdatabaselayermustberesilienttofailure
› WemayneedtoincludestoriestomakeitSQLAzureCompliant
› Whatisnotsupported
› https://msdn.microsoft.com/en-us/library/azure/ee336281.aspx
/ Copyright ©2014 by Readify Pty Ltd18
Recommended
approach
Page
Recommended approach
› UseFulleditionofSQLServeronpremiseclients
› UseSQLAzureinthecloud
› Singletenantisrecommendedduetoexistingdevelopment
› PreferSQLBasicforreallysmallclients, Standardforotherandscaleupasnecessary
› WhendevelopingnewSQLScripts,ensuretheyareSQLAzurecompliant
/ Copyright ©2014 by Readify Pty Ltd20
Page
Thank you
Himanshu Desai
Himanshu.desai@readify.net
/ Copyright ©2014 by Readify Pty Ltd22

More Related Content

Multitenancy Options on Azure

Editor's Notes

  1. For Elastic You can get about 100 database per pool Storage range per pool : 100-1200GB Pricing http://azure.microsoft.com/en-us/pricing/details/sql-database/
  2. Standard Geo-Replication http://azure.microsoft.com/blog/2014/09/03/azure-sql-database-standard-geo-replication/ Point in Time restore http://azure.microsoft.com/blog/2014/10/01/azure-sql-database-point-in-time-restore/ Point-in-time restore Point-in-time restore is the most basic restore option, which you get automatically with basic, standard, and premium databases. You can use point-in-time restore to return your database to an earlier point in time. Go back 7 days with basic, 14 days with standard, and 35 days with premium. See Azure SQL Database Backup and Restore and Azure SQL Database Point in Time Restore (blog) for more information. Watch the video Restore a SQL Database Using Point in Time Restore to see how easy it is to use point-in-time restore. Geo-restore Geo-restore is similar to point-in-time restore. You also get it automatically with basic, standard, and premium databases. Geo-restore, however, is designed to be a basic recovery option when a database is unavailable because of a large scale incident or outage in the region where your database is hosted. The feature uses Azure read-access geo-redundant storage to store the most recent daily backup of your databases in a different geographical location. Consider geo-restore as a basic disaster recovery solution if your application can tolerate up to 24 hours downtime and data loss. For more information, read Azure SQL Database Geo-Restore (blog), and watch the video Restore a SQL Database Using Geo-Restore to see how to recover a database using geo-restore. Standard geo-replication Standard geo-replication is available for standard and premium databases. It’s designed for less write-intensive applications that nevertheless process high volumes of data and have more aggressive recovery requirements than geo-restore can offer. When the primary database fails, it shows as degraded, and you can initiate failover to a non-readable secondary database stored in a different region. For more information, see Standard Geo-Replication for Azure SQL Database and Azure SQL Database Standard Geo-Replication (blog), which has a thorough comparison of active geo-replication and standard geo-replication. Active geo-replication Active Geo-Replication is available for premium databases. It’s designed for write-intensive applications with the most aggressive recovery requirements. Using active geo-replication, you can create up to four readable secondaries on servers in different regions. These secondaries are maintained as continuous copies of the primary, and you can initiate failover to a secondary in the same way as standard geo-replication. Active geo-replication provides the highest degree of resiliency to temporary connection problems and high latency, so can support online application upgrade or relocation scenarios, as well as load balancing for read-only workloads. For more information, see Active Geo-Replication for Azure SQL Database and Spotlight on SQL Database Active Geo-Replication (blog). Additional business continuity features Database copy allows you to create a copy of a database either on the same or different servers in the same or different regions. The copy is transactionally consistent with the source when the database copy operation is complete. It is however a one-time copy, and not continuously replicated from the source. The feature can be used for data migration or ad hoc copy needs. For more information, see Copying Databases in Azure SQL Database. The import and export service lets you manually or automatically export a BACPAC file, which contains a logical copy of data and schema of a database, and then import the file to restore the database. Use import and export for Web and Business databases, which do not support other business continuity features. Or use it in addition to other business continuity features for long-term storage of daily backups or to retain backups beyond the retention period for point-in-time restore. For more information, see How to: Use the Import and Export Service in Azure SQL Database
  3. For Elastic You can get about 100 database per pool Storage range per pool : 100-1200GB Pricing http://azure.microsoft.com/en-us/pricing/details/sql-database/
  4. Standard Geo-Replication http://azure.microsoft.com/blog/2014/09/03/azure-sql-database-standard-geo-replication/ Point in Time restore http://azure.microsoft.com/blog/2014/10/01/azure-sql-database-point-in-time-restore/ Point-in-time restore Point-in-time restore is the most basic restore option, which you get automatically with basic, standard, and premium databases. You can use point-in-time restore to return your database to an earlier point in time. Go back 7 days with basic, 14 days with standard, and 35 days with premium. See Azure SQL Database Backup and Restore and Azure SQL Database Point in Time Restore (blog) for more information. Watch the video Restore a SQL Database Using Point in Time Restore to see how easy it is to use point-in-time restore. Geo-restore Geo-restore is similar to point-in-time restore. You also get it automatically with basic, standard, and premium databases. Geo-restore, however, is designed to be a basic recovery option when a database is unavailable because of a large scale incident or outage in the region where your database is hosted. The feature uses Azure read-access geo-redundant storage to store the most recent daily backup of your databases in a different geographical location. Consider geo-restore as a basic disaster recovery solution if your application can tolerate up to 24 hours downtime and data loss. For more information, read Azure SQL Database Geo-Restore (blog), and watch the video Restore a SQL Database Using Geo-Restore to see how to recover a database using geo-restore. Standard geo-replication Standard geo-replication is available for standard and premium databases. It’s designed for less write-intensive applications that nevertheless process high volumes of data and have more aggressive recovery requirements than geo-restore can offer. When the primary database fails, it shows as degraded, and you can initiate failover to a non-readable secondary database stored in a different region. For more information, see Standard Geo-Replication for Azure SQL Database and Azure SQL Database Standard Geo-Replication (blog), which has a thorough comparison of active geo-replication and standard geo-replication. Active geo-replication Active Geo-Replication is available for premium databases. It’s designed for write-intensive applications with the most aggressive recovery requirements. Using active geo-replication, you can create up to four readable secondaries on servers in different regions. These secondaries are maintained as continuous copies of the primary, and you can initiate failover to a secondary in the same way as standard geo-replication. Active geo-replication provides the highest degree of resiliency to temporary connection problems and high latency, so can support online application upgrade or relocation scenarios, as well as load balancing for read-only workloads. For more information, see Active Geo-Replication for Azure SQL Database and Spotlight on SQL Database Active Geo-Replication (blog). Additional business continuity features Database copy allows you to create a copy of a database either on the same or different servers in the same or different regions. The copy is transactionally consistent with the source when the database copy operation is complete. It is however a one-time copy, and not continuously replicated from the source. The feature can be used for data migration or ad hoc copy needs. For more information, see Copying Databases in Azure SQL Database. The import and export service lets you manually or automatically export a BACPAC file, which contains a logical copy of data and schema of a database, and then import the file to restore the database. Use import and export for Web and Business databases, which do not support other business continuity features. Or use it in addition to other business continuity features for long-term storage of daily backups or to retain backups beyond the retention period for point-in-time restore. For more information, see How to: Use the Import and Export Service in Azure SQL Database