architecting windows azure
DESCRIPTION
Practical guide to Windows Azure PlatformTRANSCRIPT
2010 SPALIO 27 D.
Microsoft Partnerių konfrencija 2010
Architecting Cloud-based Applications for Windows Azure Platform
Sergejus BarinovasArchitect, Adform
2010 SPALIO 27 D.
Microsoft Partnerių konfrencija 2010
Quiz
Who has heard about Windows Azure Platform?
2010 SPALIO 27 D.
Microsoft Partnerių konfrencija 2010
Quiz
Who has attended anyWindows Azure presentation?
2010 SPALIO 27 D.
Microsoft Partnerių konfrencija 2010
Quiz
What parts does Windows Azure Platform consist of?
2010 SPALIO 27 D.
Microsoft Partnerių konfrencija 2010
Answer• Windows Azure Compute– Web Role– Worker Role
• Windows Azure Storage– Blob Storage– Drive Storage– Table Storage– Message Queue Storage
• SQL Azure
– Project Huston• Windows Azure AppFabric
Client Access• Windows Azure AppFabric
Service Bus• Project Dallas• Project Sydney
2010 SPALIO 27 D.
Microsoft Partnerių konfrencija 2010
Topic Background
Who has attended anyWindows Azure presentation?
2010 SPALIO 27 D.
Microsoft Partnerių konfrencija 2010
Topic Background
Who knows how, when and what part of Windows Azure to use?
2010 SPALIO 27 D.
Microsoft Partnerių konfrencija 2010
Topic Background
Why?
2010 SPALIO 27 D.
Microsoft Partnerių konfrencija 2010
Topic Background
Lack of practical presentations!Captain Obvious
2010 SPALIO 27 D.
Microsoft Partnerių konfrencija 2010
Disclaimer
This is not a marketing bu presentation
2010 SPALIO 27 D.
Microsoft Partnerių konfrencija 2010
Disclaimer
This is not an overview of Windows Azure Platform
2010 SPALIO 27 D.
Microsoft Partnerių konfrencija 2010
Disclaimer
This is a practical design session how to leverage Windows Azure
2010 SPALIO 27 D.
Microsoft Partnerių konfrencija 2010
ARCHITECTING FOR THE CLOUD
2010 SPALIO 27 D.
Microsoft Partnerių konfrencija 2010
Our Current Mindset
• We have enough hardware resources– Powerful servers– Fast hard drives
2010 SPALIO 27 D.
Microsoft Partnerių konfrencija 2010
Our Current Mindset
• Number of servers is more or less fixed– Failures are very unlike– All maintenance and new hardware is planned
in advance
2010 SPALIO 27 D.
Microsoft Partnerių konfrencija 2010
Our Current Mindset
• We have reliable network connection– Connection time-out is a BUG, not a FEATURE
2010 SPALIO 27 D.
Microsoft Partnerių konfrencija 2010
Cloud Mindset
• Only mid-range hardware is available and it can FAIL– No powerful servers– No fast hard drives
2010 SPALIO 27 D.
Microsoft Partnerių konfrencija 2010
Cloud Mindset
• Number of servers is dynamic (unknown)– Implies scale-out architecture
2010 SPALIO 27 D.
Microsoft Partnerių konfrencija 2010
Cloud Mindset
• Network connection will always FAIL– Every operation should have retries
2010 SPALIO 27 D.
Microsoft Partnerių konfrencija 2010
ARCHITECTING PINGY
2010 SPALIO 27 D.
Microsoft Partnerių konfrencija 2010
What’s Pingy?
Multi-tenant SaaS, that enables monitoring availability and response times of the external Web sites
2010 SPALIO 27 D.
Microsoft Partnerių konfrencija 2010
Pingy Subscriptions
• Personal– Free of charge–Monitoring up-to 2 web sites– Facebook, LiveID and Google authentication
2010 SPALIO 27 D.
Microsoft Partnerių konfrencija 2010
Pingy Subscriptions
• Professional– 49€/year– Custom branding–Monitoring up-to 20 web sites– Facebook, LiveID and Google authentication
2010 SPALIO 27 D.
Microsoft Partnerių konfrencija 2010
Pingy Subscriptions
• Enterprise– 99€/year– Custom branding–Monitoring up-to 200 web sites– Active Directory authentication
2010 SPALIO 27 D.
Microsoft Partnerių konfrencija 2010
Architectural Goals
• Scalability• Availability• Performance
2010 SPALIO 27 D.
Microsoft Partnerių konfrencija 2010
Design Iteration #1
Web site Data store External web sites
Login()Save(Url, Period)
Ping service
GetUrls(Period)Ping(Url)
Save(Results)
GetStatistics()
2010 SPALIO 27 D.
Microsoft Partnerių konfrencija 2010
Design Iteration #1: On-Premise Architecture• Web site– Stateless ASP.NET application within IIS
• Ping service– .NET executable within Windows service
• Data store– SQL Server
2010 SPALIO 27 D.
Microsoft Partnerių konfrencija 2010
Design Iteration #1: Windows Azure Architecture• Web site– Stateless ASP.NET app within Web Role
• Ping service– .NET executable within Worker Role
• Data store– SQL Azure / Windows Azure Table Storage
2010 SPALIO 27 D.
Microsoft Partnerių konfrencija 2010
Windows Azure Roles• Worker Role– Windows Server 2008 x64– .NET Framework 3.5 SP1 and 4.0– Native Code Full Trust
• Web Role– Everything Worker Role has– IIS 7– ASP.NET (3.5 SP1 and 4.0)– Fast CGI
• VM Role*
1 Role = 1..N VM Instances
2010 SPALIO 27 D.
Microsoft Partnerių konfrencija 2010
VM Instances• Automatically high available and fault-tolerant• OS updates and patches are applied automatically• Scale-up VM instance
VM Instance Size CPU Memory Instance Storage I/O PerformanceSmall 1.6 GHz 1.75 GB 225 GB ModerateMedium 2 x 1.6 GHz 3.5 GB 490 GB HighLarge 4 x 1.6 GHz 7 GB 1,000 GB HighExtra Large 8 x 1.6 GHz 14 GB 2,040 GB High
2010 SPALIO 27 D.
Microsoft Partnerių konfrencija 2010
SQL Azure• Relational database as a service• A subset of full SQL Server 2008• Automatically high available and fault-tolerant• Implements same TDS protocol as a regular SQL does– Existing tools just works
• Editions– Web (up-to 5 GB)– Business (up-to 50 GB)
2010 SPALIO 27 D.
Microsoft Partnerių konfrencija 2010
Windows Azure Table Storage• Provide massively scalable structured storage• No schema stored for a table (NoSQL)• Mandatory Properties for every entity– PartitionKey & RowKey– Timestamp
• Automatic partitioning by PartitionKey
2010 SPALIO 27 D.
Microsoft Partnerių konfrencija 2010
Blob storage
Design Iteration #1: Custom Branding
Web site
Login()
Save(Files)Upload(Theme)
?
Data store Ping service
External web sites
2010 SPALIO 27 D.
Microsoft Partnerių konfrencija 2010
Design Iteration #1: Custom Branding
Web site Data store
Login()
Save(Files)
Shared Files
Upload(Theme)
Blob storage Data store Ping
serviceExternal
web siteshttp://<account>.blob.core.windows.net/<container>/<blobname>
2010 SPALIO 27 D.
Microsoft Partnerių konfrencija 2010
Blob Storage• Provide a simple interface for storing named files
along with the metadata• Block Blob– Targeted at streaming workloads– Size limit 200 GB per Blob
• Page Blob– Targeted at random read/write workloads– Size limit 1 TB per Blob
• CDN Option
2010 SPALIO 27 D.
Microsoft Partnerių konfrencija 2010
Design Iteration #2: ScalabilityWeb sites
Data store
External web sites
Login()
GetUrls()
Save()
Ping service
Ping()
Web sites
Blob storage
Upload()Theme()
Table storage
Save()
GetStats()
2010 SPALIO 27 D.
Microsoft Partnerių konfrencija 2010
Design Iteration #2: ScalabilityWeb sites
Data store
External web sites
Login()
Ping scheduler
GetUrls()ExecuteTask()
Save()
Pingers
Ping()
PingersWeb sites
Blob storage
Upload()Theme()
Table storage
Save()
GetStats()
2010 SPALIO 27 D.
Microsoft Partnerių konfrencija 2010
Design Iteration #2: ScalabilityWeb sites
Data store
External web sites
Login()
Ping scheduler
GetUrls()
Save()
PingersMessage queue
Ping()
Pingers
GetTask()
Web sites
Blob storage
Save()
Upload() QueueTask()Theme()
Table storage
GetStats()
2010 SPALIO 27 D.
Microsoft Partnerių konfrencija 2010
Windows Azure Queue Storage• Provide reliable storage and delivery of messages– Two-step consumption
• Messages put into queue can be processed in any order and multiple times
2010 SPALIO 27 D.
Microsoft Partnerių konfrencija 2010
Design Iteration #3: SSO Authentication
Web site Table storage
External web sites
Login()Save()
Ping scheduler
GetUrls()QueueTask()
Save()
GetStats()
PingersMessage queue
Ping()
Pingers
GetTask()
Web sites
Blob storage
Upload()Theme()
2010 SPALIO 27 D.
Microsoft Partnerių konfrencija 2010
SSO Authentication Challenges• Multiple authentication protocols and identity providers• Integrated Active Directory authentication from the
Cloud
2010 SPALIO 27 D.
Microsoft Partnerių konfrencija 2010
Windows Azure AppFabric Access Control• Federated, claims-based single sign-on authentication
as a service• Supports:– Active Directory Federation Services (AD FS) 2– OAuth, WS-Trust and WS-Federation protocols– Live ID, Google, Yahoo and Facebook identity providers– SAML 1.1, SAML 2.0 and SWT formats
2010 SPALIO 27 D.
Microsoft Partnerių konfrencija 2010
Summary• IIS, Web – Web Role• Windows Service – Worker Role• SQL Server – SQL Azure, Table Storage• NoSQL – Table Storage• Shared Files – BLOB Storage• Message Queues – Queue Storage• SSO Authentication – AppFabric Access Control
2010 SPALIO 27 D.
Microsoft Partnerių konfrencija 2010
Examples, Source Code• http://sergejus.blogas.lt/tag/pingy• http://sergejus.blogas.lt/tag/windows-azure
2010 SPALIO 27 D.
Microsoft Partnerių konfrencija 2010
Architecting Cloud-based Applications for Windows Azure Platform
Q&A