Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective...

48
Operating and Optimizing Multi- Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh AZR320

Transcript of Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective...

Page 1: Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh.

Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective

Rainer StropekCEO, Co-Foundersoftware architects gmbh

AZR320

Page 2: Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh.

Our Topic Today…

What is the role of an IT Pro in a world of SaaS and cloud computing with Windows Azure?

"IT professionals perform a variety of functions that range from installing applications to designing complex computer networks and information databases.

A few of the duties that IT professionals perform may include data management, networking, engineering computer hardware, database and software design, as well as management and administration of entire systems."Source: Wikipedia

Page 3: Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh.

demo

Rainer StropekCEO, Co-Foundersoftware architects gmbh

Windows Azure Configuration

See hidden slides for code snippets.

Page 4: Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh.

From Single Tenancy to Multi Tenancy

Clients Firewall,Load Balancer

Web Farm Storage Cluster

Page 5: Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh.

From Single Tenancy to Multi Tenancy

Tenant 1

Tenant 2

Tenant n

……

Page 6: Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh.

What Does Multi-Tenant SaaS Mean?

Shared infrastructure handling multiple tenants

Scale out when more tenants become active

Scale down when tenants are less active

Scale down when tenants leave

Dynamically scaling, elastic infrastructure

Page 7: Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh.

Multi-Tenant SaaS in Windows Azure

Covered By Platform

Topic Fully Partly No

Hardware

Network (up to OSI layer 4)

Internet Access

Scaling

Tenant Separation and Isolation

Backup/Recovery

Availability and SLAs

Rating/Billing

Page 8: Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh.

ScalingTenant Separation and IsolationBackup/RecoveryAvailability and SLAsRating/Billing

Page 9: Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh.

Scaling

TIME

IT C

AP

AC

ITY

Real Load

Resources

ExpectedLoad

Drives Revenue

Drives Costs (SW+HW)

Drives InitialInvestments

Page 10: Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh.

Rainer StropekCEO, Co-Foundersoftware architects gmbh

Scaling

See hidden slides for more information and code snippets.

Page 11: Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh.

Monitoring – How to Do Auto-Scaling?

Relatively easy to monitor overall load/health of compute servers

Azure Diagnostics gathers dataSystem Center Operation Manager or 3rd party tools for monitoring

Harder to monitor end-to-end performance for a certain user/tenant

Application-level logging3rd party APM tools like dynaTrace

See hidden slides for more information and links to tools.

Page 12: Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh.
Page 13: Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh.
Page 14: Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh.

As an IT Pro You Can…

…directly influence your company's margin by dynamically right-sizing the infrastructure

…care for great user experience by scaling up/out whenever necessary

Note that……there are 3rd party tools available for

scheduled scaling and auto-scaling…rules for auto-scaling can be hard to

define (think of EDoS)See hidden slides for links to tools.

Page 15: Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh.

Scaling

Tenant Separation and Isolation

Backup/RecoveryAvailability and SLAsRating/Billing

Page 16: Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh.

Tenant Separation

Tenant 1

Tenant 2

Shared Infrastructure

Page 17: Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh.

Tenant Separation

Tenant 1

Tenant 2

Shared Infrastructure

Cache

Page 18: Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh.

Tenant Separation – Bad Example

Tenant 1

Tenant 2

T1

T1

T2

T2

List of Customers

Query using

DBAdmin user

List of Customers

Query u

sing

DBAdmin u

ser

SQL Exception

U1

U2

U3

T1

T1

T2

select … from DATA inner join USERS …where USERS.UID = U1

U1

U3

Connection String inweb.config

Page 19: Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh.

As an Architect You Have to…

… decide about the right level of sharingInfluences securityInfluences systems managementInfluences operational costs

Example SQL Azure:Shared Tables (+Views)Separate tenants using schemasSeparate tenants using databasesCombination of these solutions

Tip: Consider using SQL Azure Federations for tenant separation

See hidden slides for more information and links to tools.

Page 20: Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh.

Tenant Separation – Better Example

Tenant 1

Tenant 2

T1

T2

List of Customers

List of Customers

Tenant Directory(Encrypted Connection Strings)

Tenant can bea claim of the user

Page 21: Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh.

Rainer StropekCEO, Co-Foundersoftware architects gmbh

Tenant Separation

See hidden slides for more information and code snippets.

Page 22: Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh.

Tenant Isolation

Tenant 1

Tenant 2

Shared Infrastructure

TrustedAdmin

User

E.g. Script

Execute

TrustedAdmin

User

E.g. Script

Execute

TenantAdmin

User

TenantAdmin

User

E.g. Script

E.g. Script

Sandbox

Execute

Execute

Page 23: Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh.

Tenant Isolation

E.g. Script Tenant 1

Tenant 2

Tenant 3

Tenant 4

Tenant 5

Page 24: Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh.

As an IT Pro You Have to…

… separate data stores of tenants appropriately

Do not rely just on application-level securityInfluences tenant-specific backup/restore

… protect user/tenant assignments

… protect your connection stringse.g. using encryptionUse ACS/Service Bus integration to protect service bus namespaces

Page 25: Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh.

ScalingTenant Separation and Isolation

Backup/RecoveryAvailability and SLAsRating/Billing

Page 26: Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh.

Backup and Recovery – SQL Azure

Azure Protects Us Of…

…loss of a single replica as every database is a three-node failover cluster

…simultaneous or catastrophic hardware and system failures (MS-internal backups only)

…Unwanted deletions/modifications with upcoming point-in-time restore feature

We Have to Care For…

…Protection from unwanted deletions/modifications (until point-in-time restore feature becomes available)

Copy database3rd party tools

… long-term archive (longer than upcoming point-in-time restore feature supports)

Import/export BACPACsBCP

…per tenant backup/restore

Page 27: Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh.

Backup and Recovery – Azure Storage

Azure (Can) Protect Us Of…

…server failures (storage cluster)

…data center outages (geo-replication)

…unwanted deletions/modifications in Blob Storage

If you use snapshot-feature on application-level

We Have to Care For…

…protection from unwanted deletions/modifications

If you do not create blob snapshots on application-level

Note: 3rd party tools/samples for Azure Storage backup/sync are available

Page 28: Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh.

Rainer StropekCEO, Co-Foundersoftware architects gmbh

SQL Azure Backup

See hidden slides for more information and links to tools.

Page 29: Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh.

Submit DAC Export Request

REM Backup entire databaseDacIESvcCli.exe -X -Server qgmc….database.windows.net -Database MyDatabase -ACCESSKEYTYPE shared

-BLOBURL "http://rstropekteched.blob.core.windows.net/tenant1/Tenant1Backup.bacpac" -BLOBACCESSKEY "?sr=b&si=Backup&sig=mBJfu8SODQYC5Ns…" -User … -Password …

REM Selective backupDacIESvcCli.exe -SX -Server qgmc….database.windows.net -Database MyDatabase -ACCESSKEYTYPE shared

-BLOBURL "http://rstropekteched.blob.core.windows.net/tenant1/Tenant1Backup.bacpac" -BLOBACCESSKEY "?sr=b&si=Backup&sig=mBJfu8SODQYC5Ns…" -User … -Password …-SXF c:\backup\selection.xml

Tip: Use Shared Access Signatures

Page 30: Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh.

Submit DAC Export Request

<?xml version="1.0" encoding="utf-8" ?><TableNames>

<TableName><SchemaName>tenant1</SchemaName><Name>Table1</Name>

</TableName><TableName>

<SchemaName>tenant1</SchemaName><Name>Table2</Name>

</TableName>…

</TableNames>

Specify schema/table filter here

Page 31: Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh.

As an IT Pro You Have to…

…understand that backup and recovery in Azure is not done 100% by Microsoft

…care for proper backup and recovery mechanisms suitable to the SLAs that you offer to your end customers

Page 32: Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh.

ScalingTenant Separation and IsolationBackup/Recovery

Availability and SLAs

Rating/Billing

Page 33: Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh.

As an IT Pro You Have to…

…understand what the SLA guarantees of Microsoft for Windows Azure mean

Note that you might get a credit if SLA is violated. You will not be compensated for a possible damage that exceeds the value of the credit.

…understand that Azure SLAs and application-level SLAs are two totally different things

Page 34: Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh.

Failover Data Centers

Deploy to multiple locationsAzure Traffic Manager

FailoverPerformance(routed to nearest location)Round Robin

SQL DataData SyncBackup/restore (e.g. BACPAC)

Blobs/TablesAuto geo-replication

Data Center 1

Data Center 2

Clients

Page 35: Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh.

Rainer StropekCEO, Co-Foundersoftware architects gmbh

Azure Traffic Manager

See hidden slides for more information and code snippets.

Page 36: Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh.

ScalingTenant Separation and IsolationBackup/RecoveryAvailability and SLAs

Rating/Billing

Page 37: Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh.

As an IT Pro You Might Have to…

…gather the base data to enable usage-based billing

…enforce usage limits

…monitor fair use policies

…etc.

Page 38: Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh.

Usage Analytics

Compute Resources

Parse IIS logs

Application-level logging

3rd party APM tools

Storage

SQL AzureDynamic Management Views

Windows Azure StorageAzure Storage Analytics

Page 39: Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh.
Page 40: Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh.

Rainer StropekCEO, Co-Foundersoftware architects gmbh

CloudNinja Metering Block

Page 41: Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh.

Summary

Page 42: Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh.

As an IT Pro You Will…

…optimize the operational costs of your SaaS infrastructure

…guarantee the integrity and security of your SaaS solution

…care for great user experience by providing the expected availability and performance levels

…play an important role in your company's rating/billing process

Scaling

Tenant separation and isolationBackup and recovery

ScalingHigh availability concepts

Gather/monitor usage data

Page 44: Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh.

Resources

Connect. Share. Discuss.

http://northamerica.msteched.com

Learning

Microsoft Certification & Training Resources

www.microsoft.com/learning

TechNet

Resources for IT Professionals

http://microsoft.com/technet

Resources for Developers

http://microsoft.com/msdn

Page 45: Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh.

Complete an evaluation on CommNet and enter to win!

Page 46: Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh.

Please Complete an Evaluation Your feedback is important!

Multipleways to Evaluate Sessions

Scan the Tagto evaluate thissession now on myTechEd Mobile

Page 47: Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh.

© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to

be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS

PRESENTATION.

Page 48: Operating and Optimizing Multi-Tenant SaaS Applications in Windows Azure: An IT Pro Perspective Rainer Stropek CEO, Co-Founder software architects gmbh.