Copyright © 2012 Smartbridge LLC. All rights reserved. Migrating SaaS Applications to Windows Azure Lessons Learned 04.04.2012
Copyright © 2012 Smartbridge LLC. All rights reserved.
Migrating SaaS Applications to Windows Azure
Lessons Learned
04.04.2012
Copyright © 2012 Smartbridge LLC. All rights reserved. 2
Speaker Introduction
Deepthi Raju Marketing Technology Services Deepthi joined Smartbridge in 2005 and has over twenty years of technology consulting experience in energy and retail industries. Deepthi currently leads the product development of SmartMPM which is a state-of-the-art marketing performance measurement tool used by marketers across variety of industries. Deepthi recently led the migration of Smartbridge products from private cloud to public hosted cloud environments and is an expert in technology architectures developed for cloud applications. Prior to Smartbridge, Deepthi was an architect and senior developer at Schlumberger responsible for the development of drilling log analysis technologies.
Copyright © 2012 Smartbridge LLC. All rights reserved. 3
What we are here to talk about?
Copyright © 2012 Smartbridge LLC. All rights reserved. 4
Outline
1. What are the market trends?
2. Cloud characteristics and options
3. SmartMPM, a SaaS Case Study
4. Azure – Component breakdown
5. Key Challenges
6. Architectural Best Practices
7. Cost Considerations
Copyright © 2012 Smartbridge LLC. All rights reserved. 5
What are the market trends? “Majority of large enterprises consider speed and agility to be the primary benefit of cloud. We’ll see about a 10x increase in private cloud deployments in 2012” - Gartner
“business groups are adopting cloud 2.5 times faster than IT groups.” – Forrester
Copyright © 2012 Smartbridge LLC. All rights reserved. 6
What are your options?
Storage
Servers
Networking
O/S
Middleware
Virtualization
Data
Applications
Runtime
You
man
age
Managed by vendor
Storage
Servers
Networking
O/S
Middleware
Virtualization
Data
Applications
Runtime Yo
u m
anag
e
Storage
Servers
Networking
O/S
Middleware
Virtualization
Data
Applications
Runtime
You
man
age
Managed by vendor
Storage
Servers
Networking
O/S
Middleware
Virtualization
Data
Applications
Runtime
Managed by vendor
(On-Premises) IaaS PaaS SaaS
Copyright © 2012 Smartbridge LLC. All rights reserved. 7
Benefits of SaaS Applications on the cloud
• Faster customer acquisition
• Higher availability; greater scalability
• Enables companies to focus on core product features
• Opens new markets
• Lower cost of ownership
• Ease of administering multi-tenancy
• Lower cost of maintenance and deployment
Copyright © 2012 Smartbridge LLC. All rights reserved. 8
SmartMPM – a SaaS solution for marketers
Convenience Accuracy Customization Better executive decisions based on ROI
Manual Extraction & Compilation Excel is the consolidation solution Continuously changing data ROI? Not sure where to start
Mobile
Radio
TV
Web
Search Engine
Paid Search
YouTube
Mobile
Radio
TV
Web
Search Engine
Paid Search
YouTube
Copyright © 2012 Smartbridge LLC. All rights reserved. 9
SmartMPM – our SaaS Marketing Solution
Copyright © 2012 Smartbridge LLC. All rights reserved. 10
SmartMPM Requirements
1. Support multi-tenancy.
2. Scale efficiently.
3. Have functions in place to monitor, configure, and manage the application and tenants.
4. Support unique user identification and authentication.
5. Support some level of customization for each tenant.
Copyright © 2012 Smartbridge LLC. All rights reserved. 11
Components of Windows Azure
Web/Worker Roles SQL Azure Tables Blobs Data Management
SQL Azure Reporting (in CTP)
Business Analytics
Cloud Applications
Queues Service Bus Messaging
Traffic Manager Connect Networking
In-Memory CDN Caching
HPC Scheduler HPC
Marketplace Commerce
Windows Azure Active Directory
Identity
.NET Java PHP
Node.js
SDKs
Copyright © 2012 Smartbridge LLC. All rights reserved. 12
SmartMPM Pre-Azure Architecture (On-Premise)
Web servers
Internet
File Storage Mirrored Database Servers
Load Balancer
On-Premise
Third Party Data Providers
Copyright © 2012 Smartbridge LLC. All rights reserved. 13
SmartMPM Architecture on Azure
Web application on
Web Role Instances SQL Azure
Binary Files Blob Storage
Background processes
Worker Role Instances
Third Party Data
Providers
Windows Azure Diagnostics
Logs Table Storage
Session State Windows Azure Cache
Third Party Data
Providers
Copyright © 2012 Smartbridge LLC. All rights reserved. 14
SmartMPM Migration Process
Migration
Deployment Model
Platform Selection Execute (Agile Approach)
Monitor
Decide Cloud Type (Public, Private,
Hybrid)
Develop, Deploy & Test Prototype on Trial Subscription
Plan Migration Phases
Establish Driving Factors for Cloud
Migration
Setup Windows Azure dev
environment.
Evaluate Platform Options and finalize
platform
Proto Type Phase 1
Migrate database to SQL Azure
Test & Rollout
Setup Dev, QA & Production
environments on Azure
Capacity Utilization
Performance
Usage Cost
On-Premise Hybrid Hybrid Public Cloud Public Cloud
Setup Windows Azure Account, Subscriptions &
Users
Phase 2
Rewrite the application
components
Test & Rollout
Research & Design Azure
solution
Identify technical risks & define diagnostics
strategy
Phase 3
Test & Rollout
Take on-premise Infrastructure
down
Develop Worker Roles
Design Worker Roles for
background processes
Establish Cloud Center of
Excellence
Copyright © 2012 Smartbridge LLC. All rights reserved. 15
Challenges – SQL Azure 1. Connectivity Issues
• Provides a large-scale multi-tenant database service on shared resources • Connections may close or may not be available when requested • Retry logic around every connection request is needed • Transactions should be coded to self-recover
2. Migration Process • No support for RESTORE and BACKUP • Use SSIS or bulk copy utility/migration wizard/Red Gate SQL Azure Backup
3. Clustered Index
• Is a requirement • SELECT INTO is not supported
4. Size Limitation
• Web Edition 5GB • Business Edition 150 GB
5. Security
• Data Encryption methods not supported. Uses SSL for data transfers • Authentication – only supports database logins not network logins
Copyright © 2012 Smartbridge LLC. All rights reserved. 16
Challenges – Application Development 1. Lack of Session Affinity
• In-Proc sessions do not work
2. Persistent Storage on Server • Storage on local web server is absolute “No”
3. Integration with on-premise systems
• Legacy APIs and Interfaces between systems may not work. • Take advantage of Connect, Service Bus & Queues.
4. Latency • Choose appropriate data center • Cache as much as possible
5. Debugging & Troubleshooting
• Traditional logging utilities may not work. • Take advantage of windows Azure Diagnostics.
Copyright © 2012 Smartbridge LLC. All rights reserved. 17
Deployment Considerations 1. Deployment
During development – Redeploying whole package can be time consuming – Use Web deploy for upgrading a single role instance
Production
– Redeploying whole package is the only option
2. Choose a deployment option that matches your need • Small Teams - Publish from Visual Studio IDE directly to Azure • Mid Sized Teams - Generate Package and upload from Management
portal • Large Teams - Build scripts to auto deploy package to Azure using
PowerShell scripts
Copyright © 2012 Smartbridge LLC. All rights reserved. 18
Architectural best practices
Scale out, not up
1. No local state or affinity 2. Minimize dependencies
Avoid Synchronicity
1. Minimize dependency 2. Loosely couple “process” from “process-trigger” 3. Queue the work
Single big box
Multiple small boxes
Copyright © 2012 Smartbridge LLC. All rights reserved. 19
Architectural best practices Cache Cache everything you can:
1. Windows Azure Cache 2. Table Storage 3. SQL Azure 4. Content Distribution Network
Monitor Health & Performance Use Azure diagnostics API to collect
1. Event Logs 2. Performance Counters 3. Trace/Debug Information (Logs) 4. IIS Logs, Failed Request Logs
Copyright © 2012 Smartbridge LLC. All rights reserved. 20
Architectural best practices Scale data tier 1. Prevent data tier bottleneck 2. Put compute and storage in the same data center 3. Build an informed data partitioning strategy using SQL
federations
Security 1. Consider all cases where data can flow over insecure links. 2. Take steps to protect data
• HTTPS • Message-level signing/encryption • VPN Options (e.g. Windows Azure Connect)
Copyright © 2012 Smartbridge LLC. All rights reserved. 21
Architectural considerations impacting cost 1. Purchasing models
• Consumption – pay as you go • Subscription – value for commitment • Additional Licensing – coordinated purchasing (volume discounts)
2. Basis for Consumption Prices
• Compute - instance size & hours of utilization • Storage - size and transactions • Bandwidth – amount of data transferred • Distributed Cache Service – size • Messaging (Queues, Service Bus) - number of messages
3. Predicting Cost
• Convert to units that make sense for your service – user, feature, business transaction
• Simulate variable costs on top of the fixed cost • Use the pricing calculator for rough estimate
Copyright © 2012 Smartbridge LLC. All rights reserved. 22
Architectural considerations impacting cost
4. Factoring Cost into architecture decisions • Data Storage: SQL Azure or Azure Storage or Blob? • Session State: Azure Cache, SQL Azure or Azure Storage? • Integration: App Fabric Service Bus or Azure Connect?
5. Optimize Cost
• Measure everything and anything • Improve performance because better performance = lower cost • Whenever possible use cache and compress content • Use different storage accounts for application data and
diagnostics data • Pick the correct VM size (1 VM is not equal to 1 task) • Bandwidth reduction – aggregate, protocol
KEEP IN MIND YOU ARE CHARGED EVEN IF YOU ARE NOT USING – SO
DELETE WHAT YOU ARE NOT USING.
Copyright © 2012 Smartbridge LLC. All rights reserved. 23
Smartbridge Services – Helping clients find the right answer
Enterprise Systems
Enterprise Information Management
Emerging Technologies
IT Strategy ERP – JD Edwards Retail POS/BOS Systems Restaurant Technology Information Portals Application Development
Business Intelligence & Analytics Performance Management Enterprise Integration Data Governance Master Data Management Simulations & Forecasting Optimization
Cloud Services Enterprise Mobility Mobile Applications Marketing Performance & Analytics
Program & Project Management
Quality Assurance Implementation
Strategy, Assessment & Planning
Solution Architecture
Agile M
ethodology G
loba
l Del
iver
y
Copyright © 2012 Smartbridge LLC. All rights reserved. 24
Current state Assessment
Future computing environment needs assessment
Opportunities to leverage the cloud
Risks and mitigation strategies
Implementation roadmap
Establish cloud infrastructure – Servers and Storage
Mail Migration to Office365
Sharepoint
Security and Malware
Low criticality app migration
Architecture development for complex applications
Development / migration to Cloud architecture
Integration into the enterprise
Deployment on the cloud
Smartbridge Cloud Advisory Services Leveraging our Hands On Experience with the cloud
Assessment & Strategy
Application Development / Migration
Commodity App Migration
Copyright © 2012 Smartbridge LLC. All rights reserved.
Deepthi Raju Director, Marketing Technology Services [email protected] 713.501.3415 Jon Shale Director, Enterprise Mobility & Cloud Technologies [email protected] 713.516.3098
Smartbridge
Houston Office [email protected]
713-360-2500
Copyright © 2012 Smartbridge LLC. All rights reserved. 26
ASP.NET (Web Role)
Public Cloud
Sample Hybrid Enterprise Web Application
Private Cloud
Blob Storage Service
Queue Service
Web Browser
Service Bus Access Control Service
User Data
Application Data
Reference Data
Enterprise Data
Enterprise Web Svc
Enterprise Application
Third Party SaaS App Service
Enterprise Identity
ASP.NET (Web Role) ASP.NET
(Web Role) Web Svc
(Web Role)
Web Svc (Web Role) Web Svc
(Web Role)
Jobs (Worker Role)
Table Storage Service