Windows Azure Web Sites

Preview:

Citation preview

#techday2012

Sergejus Barinovas (@sergejusb)Software ArchitectAdform

Windows Azure Web Sites: new cloud hosting offering

• Software Architect at Adform

• Responsibilities includes Cloud strategy

• Experience in large scale deployments

• Windows Azure MVP

• One of the first 21 Windows Azure MVP

/me

• Given

• ASP.NET MVC web site with source code available on

GitHub

• How long

• it will take to build, deploy & host this web site?

• Guess!

/quiz

3 minutes*

*or I’ll dance boogie-woogie on stage

/azure --help

Cloud services

Virtual machines

• Virtual machines

• Infrastructure-as-a-Service

• Windows Server & Linux

• Flexible storage options

• Virtual private networks

/azure vm --help

Too much

infrastructureToo much

management

• Cloud services

• Platform-as-a-Service

• Scalable apps & services

• Automated management

• Various multimedia and device options

/azure service --help

Too much

customizationToo long

deployment

/azure --help

Cloud services

Web sitesVirtual machines

• Web sites

• Cloud hosting service

• Build with ASP.NET, PHP or Node.js

• Deploy in seconds with VS, TFS or Git

• Start for free, scale-up as you go

/azure site --help

/azure --help --verboseOn-Premises

Virtualization

O/S

Hardware

Native Code

Custom Software

Network

Data

Applications

Firewall

Web Sites

Applications

Data

Cloud Services

Native Code

Startup Tasks

Applications

Firewall Rules

Data

Virtual Network

Virtual Machines

Native Code

Custom Software

Virtual Network

Data

Applications

Firewall Rules

O/S

Focus on the Application

Azure Web Sites – Azure done right

• Build with

/azure site --list platforms

more to come…

• Deploy using

/azure site --list deployments

Visual Studiopublishing

Team FoundationService

Git

• Visual Studio publishing

• Web Deploy & FTP publishing

• Integrate deployment with CI process

/azure site --vs --help

Demo: VS → publish

• Team Foundation service awesomeness

• Team Foundation Server as-a-service

• Deploy on check-in from local computer

/azure site --tf --help

Demo: tf checkin

• Git awesomeness

• Deploy on push from local computer

• Deploy on push from GitHub

• Deploy on push from Codeplex

/azure site --git --help

Demo: git push azure

• Store in

/azure site --list db

Microsoft ClearDB MongoLab

• Free shared instance model

• Price: 10 free web sites

• Outbound traffic: 165 MB / day

• Other limitations: RAM & CPU time quotas

• Domains: azurewebsites.net

• Storage: 1 GB shared by all sites

/azure site --instance --free --help

• Paid shared instance model

• Price: $0.02 / hour × instance count

• Outbound traffic: first 5 GB for free, then $0.12 / GB

• Domains: azurewebsites.net or custom

• Storage: 1 GB shared by all sites

/azure site --instance --shared --help

• Paid reserved instance model

• Price: $0.08 – $0.32 / hour × VM count

• Outbound traffic: first 5 GB for free, then $0.12 / GB

• Domains: azurewebsites.net or custom

• Storage: 10 GB shared by all sites

/azure site --instance --reserved --help

Demo: configure & scale

• Node.js

• Event-driven, non-blocking, cross-platform web server

• Built on top of Chrome JavaScript runtime

• Very popular within open source community

/azure site node --help

Demo: node app.js

• Web sites summary

• Easy to start. No changes in app, quick to create

• Easy to build. ASP.NET, PHP, Node.js

• Easy to deploy. VS, TFS, Git, GitHub, CodePlex

• Easy to scale. Start free, scale as you go

/azure site --help --verbose

Q&A

Azure LB

Runtime DB

Storage Controller

IIS ARR(LB)

Web Server

Web SiteDB

1

2

3

4

5

5

5

5

1. Request for a foo.com arrives to ARR/Load Balancer

2. ARR gets info from Runtime DB about foo.com and determines which Web server(s)) should host the site.

(Antares is actively monitoring all Web Servers in the farm)

3. ARR forwards request to the designated Web Server

4. Web Server provisions site * de-provision inactive sites

5. Web Server executes request accessing site’s content and site’s DB

Request Process Flow – Inactive Site (Cold Site)

Azure LB

Storage Controller

IIS ARR(LB)

Web Server

Web SiteDB

1 2

3

3

3

3

1. Request for a foo.com arrives to ARR/Load Balancer, which already “familiar” with foo.com

2. ARR “remembers” foo.com and route the request to the right web Server(s).

* Subsequent requests to this site get routed to a Web Server that has the site provisioned.

3. Web Server executes request accessing site’s content and site’s DB

Request Process Flow – Active Site (Hot Site)

Azure LB

Runtime DB

Storage Controller

IIS ARR(LB)

Web Server

Cloud Drive Deploymen

t Server(s)

Web Sites DBs

All DBs are running on SQL Azure

Azure Blobs as durable storage

Windows Azure Worker Roles

Antares on Windows Azure Block Diagram

API Frontend

Runtime DB

Azure LB

Storage Controller

IIS ARR(LB)

Web Server

Cloud DriveDeploymen

t Server(s)

Web Sites DBs

All DBs are running on SQL Azure

Azure Blobs as durable storage

Windows Azure Worker Roles

API Frontend

Metering

DWAS

Site (W3WP.exe)Site (W3WP.exe)

Site (W3WP.exe)

Monitor resources usage

Dynamic Web Activation Service

W3WP.exe IIS Application Pool Process

Antares on Windows Azure Block Diagram

Web Server Internals

DWAS (Dynamic Activation Service)

Config and files – “Change Notifications”Quota Enforcement

Site Activation / deactivation

Monitoring Agent

Errors and logging

Resource consumption

“Modified” Web Server

Central data store (SQL Server, SQL-Azure)

Web Sites Data

Hosting plans

How It Works

Web Servers Monitor / Stats