Windows Azure Web Sites - Things they don't teach kids in school - NDC London

Maarten Balliauw
Maarten BalliauwDeveloper Advocate
Windows Azure Web Sites
Things they don’t teach kids in school
Maarten Balliauw
@maartenballiauw
Who am I?
Maarten Balliauw
Technical Evangelist, JetBrains
AZUG
Focus on web
ASP.NET MVC, Windows Azure, SignalR, ...
MVP Windows Azure & ASPInsider
Big passion: Windows Azure
http://blog.maartenballiauw.be
@maartenballiauw
Shameless self promotion: Pro NuGet http://amzn.to/pronuget2
Agenda
Windows Azure Web Sites
Architecture
Project Kudu
Kudu kung-fu
Application log streaming
Managing settings
Staging and Production
Multi-tier deployments
Customizing deployments
Running batch files / background processes (*)
Windows Azure Web Sites
Web Sites in Seconds
Start Simple

Your way

Go Live

start free, scale up and out
as you go, friction-free
and without the headaches

with asp.net, php or
node.js, develop on
Windows, OSX or
Linux

deploy live in seconds,
easily monitor
performance, rapidly
diagnose and
fix issues
demo

Windows Azure
Web Sites
Architecture
Load balancer
Layers
1st layer: Windows Azure load balancer
2nd layer: IIS + ARR
ARR (disclaimer: not
)
“Reverse proxy”
Verifies hosting database (plans, quotas, …)
Negotiates best node to run your site on
Site not used much? Put it on a highly loaded machine
Web servers
%SYSTEM32%inetsrvconfigapplicationHost.config is taken out of the loop
SQL Azure
No refreshing of all app pools when file is saved
Storage
“File share” hosted on other machines
Using “WA drive” on blob storage
Dynamic website activation service
Verifies runtime database (plans, quotas, …)
Site not used for a while? Remove it from the server
Web Sites are not in IIS. They only
are when a request comes in!
1st request (cold site)
Web Worker
IIS ARR
(LB)

Azure
LB

Runtime
DB

Other
databases

Storage
Controller
xth request (hot site)
Web Worker
IIS ARR
(LB)

Azure
LB

Other
databases

Storage
Controller
Your app not being used for a while?
Provisioning, publishing, metering
Provisioning and publishing
Storage and database
!= launching a website on web farm
Metering
By web servers once a site is loaded
Reported back to runtime database
Provisioning, publishing, metering
IIS ARR
(LB)

Web Worker

SQL Azure

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

Runtime
DB
Metering

Azure
LB

DWAS

Blob storage

Other
databas
es

Provisioning /
API Frontend

Deployment
Server

Storage
Controller

X-Drive

Windows Azure Worker
Role
demo

Let’s find some
proof…
Need more
proof?
Windows Azure Pack
(http://www.microsoft.com/enus/server-cloud/windowsazure-pack.aspx)
Or:
http://blog.maartenballiauw.be/
post/2012/07/24/Hands-onWindows-Azure-Services-forWindows.aspx
Project Kudu
Project Kudu
“The engine behind git deployments on Windows Azure”
Open source (www.github.com/projectkudu/kudu)
Provides git deployments
Provides builds

Provides sandboxing
Provides hosting
demo

Project Kudu
Pointers from the Kudu repository
Website extensions (analytics?)
Job runner / “worker role”
“KuduCalf”
(A Kudu is an Antelope. Its baby is a calf. A Kudu Calf is deployed from
Kudu.)
Kudu kung-fu
demo

Application log
streaming
Log streaming
All logs from the LogFiles/Application folder
Or configure it when querying: azure log tail <site> -p http
Settings
DIAGNOSTICS_LASTRESORTFILE -> file to log to when diagnostics go
wrong
DIAGNOSTICS_LOGGINGSETTINGSFILE -> settings file (json)
DIAGNOSTICS_TEXTTRACELOGDIRECTORY -> default folder
DIAGNOSTICS_TEXTTRACEMAXLOGFILESIZEBYTES-> log rotation
(bytes)
DIAGNOSTICS_TEXTTRACEMAXLOGFOLDERSIZEBYTES -> max log
size (bytes)
and secrets!

demo

Managing settings
demo

Staging and
production
Deploying a specific project file

demo

Multi-tier
Multi-tier remarks…
One .deployment file per branch
[config]
project=MultiTier.WebApi/MultiTier.WebApi.csproj
How do I deploy all tiers in a separate website?
.deployment file per branch and every tier in a branch
or customize the build
How do I deploy all tiers in the same website?
No .deployment file, just use virtual directories
Customizing the build process
Check https://github.com/projectkudu/kudu/wiki/Deployment-hooks
.deployment file
[config]
command=<whatever command>
Write in batch file, bash script, PHP, JavaScript, …
An introduction

demo

Customizing
deployments
What can I do in scripts?
A lot :-) (but not too much… there’s a sandbox)
Environment variables:
DEPLOYMENT_SOURCE
DEPLOYMENT_TARGET
DEPLOYMENT_TEMP
WEBROOT_PATH
MSBUILD_PATH
+ everything you feed it through the management portal
Sample deployment script

demo

Customizing
deployments
Great… but why?
We’ve seen the multi-tier scenario
We can download stuff (NuGet package restore, pull in external Git repos
before build)
We can run stuff (msbuild, nuget.exe, curl, php, node, …)
What about running unit tests?

demo

Customizing
deployments
Note: only in Kudu at this time!

demo

Running background
processes (workers)
Need. Moar!
Moar out of the box
REST API
https://github.com/projectkudu/kudu/wiki/REST-API

Creating a custom handler
http://www.windowsazure.com/en-us/develop/python/tutorials/web-sites-withdjango/
Need. MOAR!!!
A private Kudu build in web sites?
A private Kudu build in web sites?
Build and FTP the artifacts/debug/KuduService to your website
Add USE_PRIVATE_KUDU=1 app setting
Enjoy the ride! (but don’t call support, you’re on your own)

See http://blog.davidebbo.com/2012/06/developing-kudu-locally-and-on-azure.html
Conclusion
Key takeaways
Windows Azure Web Sites are high density
Hosted on Cloud Services
Kudu is our best friend
Settings and secrets
Muliple environments
Multiple tiers
Build customization
Unit tests
Worker roles
Kudu-in-Kudu
http://blog.maartenballiauw.
be
@maartenballiauw
http://amzn.to/pronuget

Thank you!
Windows Azure Web Sites - Things they don't teach kids in school - NDC London
1 of 44

Recommended

Scale your Magento app with Elastic Beanstalk by
Scale your Magento app with Elastic BeanstalkScale your Magento app with Elastic Beanstalk
Scale your Magento app with Elastic BeanstalkCorley S.r.l.
4.6K views38 slides
Advanced front-end automation with npm scripts by
Advanced front-end automation with npm scriptsAdvanced front-end automation with npm scripts
Advanced front-end automation with npm scriptsk88hudson
2.9K views53 slides
Running and Scaling Magento on AWS by
Running and Scaling Magento on AWSRunning and Scaling Magento on AWS
Running and Scaling Magento on AWSAOE
6.5K views66 slides
BaláZs Ree Introduction To Kss, Kinetic Style Sheets by
BaláZs Ree   Introduction To Kss, Kinetic Style SheetsBaláZs Ree   Introduction To Kss, Kinetic Style Sheets
BaláZs Ree Introduction To Kss, Kinetic Style SheetsVincenzo Barone
1.2K views27 slides
Continuous Integration and Deployment Patterns for Magento by
Continuous Integration and Deployment Patterns for MagentoContinuous Integration and Deployment Patterns for Magento
Continuous Integration and Deployment Patterns for MagentoAOE
6.8K views75 slides
Xke spring boot by
Xke spring bootXke spring boot
Xke spring bootsourabh aggarwal
1.3K views20 slides

More Related Content

What's hot

Grunt and Bower by
Grunt and BowerGrunt and Bower
Grunt and BowerGeorge Estebe
1.2K views10 slides
Npm scripts by
Npm scriptsNpm scripts
Npm scripts정윤 김
1.5K views71 slides
Godefroid Chapelle Ajax With Plone 3 Kss Development Patterns by
Godefroid Chapelle   Ajax With Plone 3   Kss Development PatternsGodefroid Chapelle   Ajax With Plone 3   Kss Development Patterns
Godefroid Chapelle Ajax With Plone 3 Kss Development PatternsVincenzo Barone
678 views10 slides
Packing for the Web with Webpack by
Packing for the Web with WebpackPacking for the Web with Webpack
Packing for the Web with WebpackThiago Temple
835 views48 slides
(WEB304) Running and Scaling Magento on AWS | AWS re:Invent 2014 by
(WEB304) Running and Scaling Magento on AWS | AWS re:Invent 2014(WEB304) Running and Scaling Magento on AWS | AWS re:Invent 2014
(WEB304) Running and Scaling Magento on AWS | AWS re:Invent 2014Amazon Web Services
17.6K views93 slides
Sergey Puzankov "How to see a bug the size of 1px" by
Sergey Puzankov "How to see a bug the size of 1px"Sergey Puzankov "How to see a bug the size of 1px"
Sergey Puzankov "How to see a bug the size of 1px"Fwdays
185 views74 slides

What's hot(20)

Npm scripts by 정윤 김
Npm scriptsNpm scripts
Npm scripts
정윤 김1.5K views
Godefroid Chapelle Ajax With Plone 3 Kss Development Patterns by Vincenzo Barone
Godefroid Chapelle   Ajax With Plone 3   Kss Development PatternsGodefroid Chapelle   Ajax With Plone 3   Kss Development Patterns
Godefroid Chapelle Ajax With Plone 3 Kss Development Patterns
Vincenzo Barone678 views
Packing for the Web with Webpack by Thiago Temple
Packing for the Web with WebpackPacking for the Web with Webpack
Packing for the Web with Webpack
Thiago Temple835 views
(WEB304) Running and Scaling Magento on AWS | AWS re:Invent 2014 by Amazon Web Services
(WEB304) Running and Scaling Magento on AWS | AWS re:Invent 2014(WEB304) Running and Scaling Magento on AWS | AWS re:Invent 2014
(WEB304) Running and Scaling Magento on AWS | AWS re:Invent 2014
Amazon Web Services17.6K views
Sergey Puzankov "How to see a bug the size of 1px" by Fwdays
Sergey Puzankov "How to see a bug the size of 1px"Sergey Puzankov "How to see a bug the size of 1px"
Sergey Puzankov "How to see a bug the size of 1px"
Fwdays185 views
Martin Aspeli Extending And Customising Plone 3 by Vincenzo Barone
Martin Aspeli   Extending And Customising Plone 3Martin Aspeli   Extending And Customising Plone 3
Martin Aspeli Extending And Customising Plone 3
Vincenzo Barone2.8K views
Improving WordPress performance (xdebug and profiling) by Otto Kekäläinen
Improving WordPress performance (xdebug and profiling)Improving WordPress performance (xdebug and profiling)
Improving WordPress performance (xdebug and profiling)
Otto Kekäläinen1.3K views
Web Development with NodeJS by Riza Fahmi
Web Development with NodeJSWeb Development with NodeJS
Web Development with NodeJS
Riza Fahmi576 views
Xdebug, KCacheGrind and Webgrind with WampServer by Mediovski Technology
Xdebug, KCacheGrind and Webgrind with WampServer  Xdebug, KCacheGrind and Webgrind with WampServer
Xdebug, KCacheGrind and Webgrind with WampServer
High Performance Snippets by Steve Souders
High Performance SnippetsHigh Performance Snippets
High Performance Snippets
Steve Souders5.9K views
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7 by Max Andersen
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7
Max Andersen1K views
SQL Server - CLR integration by Peter Gfader
SQL Server - CLR integrationSQL Server - CLR integration
SQL Server - CLR integration
Peter Gfader1.9K views
Hitchhiker's guide to the front end development by 정윤 김
Hitchhiker's guide to the front end developmentHitchhiker's guide to the front end development
Hitchhiker's guide to the front end development
정윤 김2.2K views
Max Voloshin - "Organization of frontend development for products with micros... by IT Event
Max Voloshin - "Organization of frontend development for products with micros...Max Voloshin - "Organization of frontend development for products with micros...
Max Voloshin - "Organization of frontend development for products with micros...
IT Event291 views
Webpack Tutorial, Uppsala JS by Emil Öberg
Webpack Tutorial, Uppsala JSWebpack Tutorial, Uppsala JS
Webpack Tutorial, Uppsala JS
Emil Öberg1.3K views

Similar to Windows Azure Web Sites - Things they don't teach kids in school - NDC London

Windows Azure Web Sites - Things they don’t teach kids in school - Comunity D... by
Windows Azure Web Sites- Things they don’t teach kids in school - Comunity D...Windows Azure Web Sites- Things they don’t teach kids in school - Comunity D...
Windows Azure Web Sites - Things they don’t teach kids in school - Comunity D...Maarten Balliauw
11.6K views43 slides
Azure Web SItes - Things they don't teach kids in school - Multi-Mania by
Azure Web SItes - Things they don't teach kids in school - Multi-ManiaAzure Web SItes - Things they don't teach kids in school - Multi-Mania
Azure Web SItes - Things they don't teach kids in school - Multi-ManiaMaarten Balliauw
1.9K views38 slides
Windows Azure Web Sites - Things they don’t teach kids in school - BuildStuffLT by
Windows Azure Web Sites - Things they don’t teach kids in school - BuildStuffLTWindows Azure Web Sites - Things they don’t teach kids in school - BuildStuffLT
Windows Azure Web Sites - Things they don’t teach kids in school - BuildStuffLTMaarten Balliauw
3.7K views46 slides
Hands on web development with play 2.0 by
Hands on web development with play 2.0Hands on web development with play 2.0
Hands on web development with play 2.0Abbas Raza
462 views35 slides
SQL Server - High availability by
SQL Server - High availabilitySQL Server - High availability
SQL Server - High availabilityPeter Gfader
942 views75 slides
Django Architecture Introduction by
Django Architecture IntroductionDjango Architecture Introduction
Django Architecture IntroductionHaiqi Chen
1.8K views24 slides

Similar to Windows Azure Web Sites - Things they don't teach kids in school - NDC London(20)

Windows Azure Web Sites - Things they don’t teach kids in school - Comunity D... by Maarten Balliauw
Windows Azure Web Sites- Things they don’t teach kids in school - Comunity D...Windows Azure Web Sites- Things they don’t teach kids in school - Comunity D...
Windows Azure Web Sites - Things they don’t teach kids in school - Comunity D...
Maarten Balliauw11.6K views
Azure Web SItes - Things they don't teach kids in school - Multi-Mania by Maarten Balliauw
Azure Web SItes - Things they don't teach kids in school - Multi-ManiaAzure Web SItes - Things they don't teach kids in school - Multi-Mania
Azure Web SItes - Things they don't teach kids in school - Multi-Mania
Maarten Balliauw1.9K views
Windows Azure Web Sites - Things they don’t teach kids in school - BuildStuffLT by Maarten Balliauw
Windows Azure Web Sites - Things they don’t teach kids in school - BuildStuffLTWindows Azure Web Sites - Things they don’t teach kids in school - BuildStuffLT
Windows Azure Web Sites - Things they don’t teach kids in school - BuildStuffLT
Maarten Balliauw3.7K views
Hands on web development with play 2.0 by Abbas Raza
Hands on web development with play 2.0Hands on web development with play 2.0
Hands on web development with play 2.0
Abbas Raza462 views
SQL Server - High availability by Peter Gfader
SQL Server - High availabilitySQL Server - High availability
SQL Server - High availability
Peter Gfader942 views
Django Architecture Introduction by Haiqi Chen
Django Architecture IntroductionDjango Architecture Introduction
Django Architecture Introduction
Haiqi Chen1.8K views
SSIS Monitoring Deep Dive by Davide Mauri
SSIS Monitoring Deep DiveSSIS Monitoring Deep Dive
SSIS Monitoring Deep Dive
Davide Mauri1.4K views
Continuous delivery w projekcie open source - Marcin Stachniuk by MarcinStachniuk
Continuous delivery w projekcie open source - Marcin StachniukContinuous delivery w projekcie open source - Marcin Stachniuk
Continuous delivery w projekcie open source - Marcin Stachniuk
MarcinStachniuk367 views
Java 6 [Mustang] - Features and Enchantments by Pavel Kaminsky
Java 6 [Mustang] - Features and Enchantments Java 6 [Mustang] - Features and Enchantments
Java 6 [Mustang] - Features and Enchantments
Pavel Kaminsky4.1K views
Continuous Deployment @ AWS Re:Invent by John Schneider
Continuous Deployment @ AWS Re:InventContinuous Deployment @ AWS Re:Invent
Continuous Deployment @ AWS Re:Invent
John Schneider2.4K views
Continuous Integration and Deployment Best Practices on AWS (ARC307) | AWS re... by Amazon Web Services
Continuous Integration and Deployment Best Practices on AWS (ARC307) | AWS re...Continuous Integration and Deployment Best Practices on AWS (ARC307) | AWS re...
Continuous Integration and Deployment Best Practices on AWS (ARC307) | AWS re...
Amazon Web Services29.3K views
What's New in Nuxeo Platform 7.3 by Nuxeo
What's New in Nuxeo Platform 7.3 What's New in Nuxeo Platform 7.3
What's New in Nuxeo Platform 7.3
Nuxeo1.8K views
Cloud-powered Continuous Integration and Deployment architectures - Jinesh Varia by Amazon Web Services
Cloud-powered Continuous Integration and Deployment architectures - Jinesh VariaCloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
Cloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
Amazon Web Services16.2K views
Sherlock Homepage - A detective story about running large web services - WebN... by Maarten Balliauw
Sherlock Homepage - A detective story about running large web services - WebN...Sherlock Homepage - A detective story about running large web services - WebN...
Sherlock Homepage - A detective story about running large web services - WebN...
Maarten Balliauw2.2K views
Azure serverless Full-Stack kickstart by Davide Mauri
Azure serverless Full-Stack kickstartAzure serverless Full-Stack kickstart
Azure serverless Full-Stack kickstart
Davide Mauri1.4K views
Nagios Conference 2014 - Jeff Mendoza - Monitoring Microsoft Azure with Nagios by Nagios
Nagios Conference 2014 - Jeff Mendoza - Monitoring Microsoft Azure with NagiosNagios Conference 2014 - Jeff Mendoza - Monitoring Microsoft Azure with Nagios
Nagios Conference 2014 - Jeff Mendoza - Monitoring Microsoft Azure with Nagios
Nagios1.8K views
NoSQL on microsoft azure april 2014 by Brian Benz
NoSQL on microsoft azure   april 2014NoSQL on microsoft azure   april 2014
NoSQL on microsoft azure april 2014
Brian Benz1.6K views
How To Build Website by Oliver Cai
How To Build WebsiteHow To Build Website
How To Build Website
Oliver Cai379 views
StorageQuery: federated querying on object stores, powered by Alluxio and Presto by Alluxio, Inc.
StorageQuery: federated querying on object stores, powered by Alluxio and PrestoStorageQuery: federated querying on object stores, powered by Alluxio and Presto
StorageQuery: federated querying on object stores, powered by Alluxio and Presto
Alluxio, Inc.507 views

More from Maarten Balliauw

Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s... by
Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...
Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...Maarten Balliauw
360 views64 slides
Building a friendly .NET SDK to connect to Space by
Building a friendly .NET SDK to connect to SpaceBuilding a friendly .NET SDK to connect to Space
Building a friendly .NET SDK to connect to SpaceMaarten Balliauw
182 views47 slides
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo... by
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...Maarten Balliauw
406 views52 slides
Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday... by
Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday...Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday...
Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday...Maarten Balliauw
180 views32 slides
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain... by
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...Maarten Balliauw
328 views53 slides
JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m... by
JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m...JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m...
JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m...Maarten Balliauw
280 views42 slides

More from Maarten Balliauw(20)

Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s... by Maarten Balliauw
Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...
Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...
Maarten Balliauw360 views
Building a friendly .NET SDK to connect to Space by Maarten Balliauw
Building a friendly .NET SDK to connect to SpaceBuilding a friendly .NET SDK to connect to Space
Building a friendly .NET SDK to connect to Space
Maarten Balliauw182 views
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo... by Maarten Balliauw
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...
Maarten Balliauw406 views
Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday... by Maarten Balliauw
Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday...Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday...
Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday...
Maarten Balliauw180 views
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain... by Maarten Balliauw
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
Maarten Balliauw328 views
JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m... by Maarten Balliauw
JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m...JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m...
JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m...
Maarten Balliauw280 views
.NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se... by Maarten Balliauw
.NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se....NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se...
.NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se...
Maarten Balliauw290 views
CloudBurst 2019 - Indexing and searching NuGet.org with Azure Functions and S... by Maarten Balliauw
CloudBurst 2019 - Indexing and searching NuGet.org with Azure Functions and S...CloudBurst 2019 - Indexing and searching NuGet.org with Azure Functions and S...
CloudBurst 2019 - Indexing and searching NuGet.org with Azure Functions and S...
Maarten Balliauw564 views
NDC Oslo 2019 - Indexing and searching NuGet.org with Azure Functions and Search by Maarten Balliauw
NDC Oslo 2019 - Indexing and searching NuGet.org with Azure Functions and SearchNDC Oslo 2019 - Indexing and searching NuGet.org with Azure Functions and Search
NDC Oslo 2019 - Indexing and searching NuGet.org with Azure Functions and Search
Maarten Balliauw958 views
Approaches for application request throttling - Cloud Developer Days Poland by Maarten Balliauw
Approaches for application request throttling - Cloud Developer Days PolandApproaches for application request throttling - Cloud Developer Days Poland
Approaches for application request throttling - Cloud Developer Days Poland
Maarten Balliauw1.1K views
Indexing and searching NuGet.org with Azure Functions and Search - Cloud Deve... by Maarten Balliauw
Indexing and searching NuGet.org with Azure Functions and Search - Cloud Deve...Indexing and searching NuGet.org with Azure Functions and Search - Cloud Deve...
Indexing and searching NuGet.org with Azure Functions and Search - Cloud Deve...
Maarten Balliauw1.1K views
Approaches for application request throttling - dotNetCologne by Maarten Balliauw
Approaches for application request throttling - dotNetCologneApproaches for application request throttling - dotNetCologne
Approaches for application request throttling - dotNetCologne
Maarten Balliauw246 views
CodeStock - Exploring .NET memory management - a trip down memory lane by Maarten Balliauw
CodeStock - Exploring .NET memory management - a trip down memory laneCodeStock - Exploring .NET memory management - a trip down memory lane
CodeStock - Exploring .NET memory management - a trip down memory lane
Maarten Balliauw1.9K views
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain... by Maarten Balliauw
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
Maarten Balliauw1.2K views
ConFoo Montreal - Approaches for application request throttling by Maarten Balliauw
ConFoo Montreal - Approaches for application request throttlingConFoo Montreal - Approaches for application request throttling
ConFoo Montreal - Approaches for application request throttling
Maarten Balliauw1.2K views
Microservices for building an IDE – The innards of JetBrains Rider - TechDays... by Maarten Balliauw
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...Microservices for building an IDE – The innards of JetBrains Rider - TechDays...
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...
Maarten Balliauw10.5K views
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory... by Maarten Balliauw
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...
Maarten Balliauw1.1K views
DotNetFest - Let’s refresh our memory! Memory management in .NET by Maarten Balliauw
DotNetFest - Let’s refresh our memory! Memory management in .NETDotNetFest - Let’s refresh our memory! Memory management in .NET
DotNetFest - Let’s refresh our memory! Memory management in .NET
Maarten Balliauw480 views
VISUG - Approaches for application request throttling by Maarten Balliauw
VISUG - Approaches for application request throttlingVISUG - Approaches for application request throttling
VISUG - Approaches for application request throttling
Maarten Balliauw817 views
What is going on - Application diagnostics on Azure - TechDays Finland by Maarten Balliauw
What is going on - Application diagnostics on Azure - TechDays FinlandWhat is going on - Application diagnostics on Azure - TechDays Finland
What is going on - Application diagnostics on Azure - TechDays Finland
Maarten Balliauw746 views

Recently uploaded

Deep Tech and the Amplified Organisation: Core Concepts by
Deep Tech and the Amplified Organisation: Core ConceptsDeep Tech and the Amplified Organisation: Core Concepts
Deep Tech and the Amplified Organisation: Core ConceptsHolonomics
17 views21 slides
Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De... by
Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...
Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...Moses Kemibaro
38 views38 slides
"Surviving highload with Node.js", Andrii Shumada by
"Surviving highload with Node.js", Andrii Shumada "Surviving highload with Node.js", Andrii Shumada
"Surviving highload with Node.js", Andrii Shumada Fwdays
59 views29 slides
Evaluation of Quality of Experience of ABR Schemes in Gaming Stream by
Evaluation of Quality of Experience of ABR Schemes in Gaming StreamEvaluation of Quality of Experience of ABR Schemes in Gaming Stream
Evaluation of Quality of Experience of ABR Schemes in Gaming StreamAlpen-Adria-Universität
44 views34 slides
Telenity Solutions Brief by
Telenity Solutions BriefTelenity Solutions Brief
Telenity Solutions BriefMustafa Kuğu
14 views10 slides
Business Analyst Series 2023 - Week 4 Session 7 by
Business Analyst Series 2023 -  Week 4 Session 7Business Analyst Series 2023 -  Week 4 Session 7
Business Analyst Series 2023 - Week 4 Session 7DianaGray10
152 views31 slides

Recently uploaded(20)

Deep Tech and the Amplified Organisation: Core Concepts by Holonomics
Deep Tech and the Amplified Organisation: Core ConceptsDeep Tech and the Amplified Organisation: Core Concepts
Deep Tech and the Amplified Organisation: Core Concepts
Holonomics17 views
Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De... by Moses Kemibaro
Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...
Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...
Moses Kemibaro38 views
"Surviving highload with Node.js", Andrii Shumada by Fwdays
"Surviving highload with Node.js", Andrii Shumada "Surviving highload with Node.js", Andrii Shumada
"Surviving highload with Node.js", Andrii Shumada
Fwdays59 views
Business Analyst Series 2023 - Week 4 Session 7 by DianaGray10
Business Analyst Series 2023 -  Week 4 Session 7Business Analyst Series 2023 -  Week 4 Session 7
Business Analyst Series 2023 - Week 4 Session 7
DianaGray10152 views
GDSC GLAU Info Session.pptx by gauriverrma4
GDSC GLAU Info Session.pptxGDSC GLAU Info Session.pptx
GDSC GLAU Info Session.pptx
gauriverrma415 views
Initiating and Advancing Your Strategic GIS Governance Strategy by Safe Software
Initiating and Advancing Your Strategic GIS Governance StrategyInitiating and Advancing Your Strategic GIS Governance Strategy
Initiating and Advancing Your Strategic GIS Governance Strategy
Safe Software198 views
Mobile Core Solutions & Successful Cases.pdf by IPLOOK Networks
Mobile Core Solutions & Successful Cases.pdfMobile Core Solutions & Successful Cases.pdf
Mobile Core Solutions & Successful Cases.pdf
IPLOOK Networks16 views
LLMs in Production: Tooling, Process, and Team Structure by Aggregage
LLMs in Production: Tooling, Process, and Team StructureLLMs in Production: Tooling, Process, and Team Structure
LLMs in Production: Tooling, Process, and Team Structure
Aggregage65 views
Discover Aura Workshop (12.5.23).pdf by Neo4j
Discover Aura Workshop (12.5.23).pdfDiscover Aura Workshop (12.5.23).pdf
Discover Aura Workshop (12.5.23).pdf
Neo4j20 views
The Power of Generative AI in Accelerating No Code Adoption.pdf by Saeed Al Dhaheri
The Power of Generative AI in Accelerating No Code Adoption.pdfThe Power of Generative AI in Accelerating No Code Adoption.pdf
The Power of Generative AI in Accelerating No Code Adoption.pdf
Saeed Al Dhaheri44 views
Redefining the book supply chain: A glimpse into the future - Tech Forum 2023 by BookNet Canada
Redefining the book supply chain: A glimpse into the future - Tech Forum 2023Redefining the book supply chain: A glimpse into the future - Tech Forum 2023
Redefining the book supply chain: A glimpse into the future - Tech Forum 2023
BookNet Canada46 views
"Running students' code in isolation. The hard way", Yurii Holiuk by Fwdays
"Running students' code in isolation. The hard way", Yurii Holiuk "Running students' code in isolation. The hard way", Yurii Holiuk
"Running students' code in isolation. The hard way", Yurii Holiuk
Fwdays38 views
The Power of Heat Decarbonisation Plans in the Built Environment by IES VE
The Power of Heat Decarbonisation Plans in the Built EnvironmentThe Power of Heat Decarbonisation Plans in the Built Environment
The Power of Heat Decarbonisation Plans in the Built Environment
IES VE85 views
What is Authentication Active Directory_.pptx by HeenaMehta35
What is Authentication Active Directory_.pptxWhat is Authentication Active Directory_.pptx
What is Authentication Active Directory_.pptx
HeenaMehta3515 views
"Node.js Development in 2024: trends and tools", Nikita Galkin by Fwdays
"Node.js Development in 2024: trends and tools", Nikita Galkin "Node.js Development in 2024: trends and tools", Nikita Galkin
"Node.js Development in 2024: trends and tools", Nikita Galkin
Fwdays37 views
"Package management in monorepos", Zoltan Kochan by Fwdays
"Package management in monorepos", Zoltan Kochan"Package management in monorepos", Zoltan Kochan
"Package management in monorepos", Zoltan Kochan
Fwdays37 views
PCCC23:日本AMD株式会社 テーマ1「AMD Instinct™ アクセラレーターの概要」 by PC Cluster Consortium
PCCC23:日本AMD株式会社 テーマ1「AMD Instinct™ アクセラレーターの概要」PCCC23:日本AMD株式会社 テーマ1「AMD Instinct™ アクセラレーターの概要」
PCCC23:日本AMD株式会社 テーマ1「AMD Instinct™ アクセラレーターの概要」

Windows Azure Web Sites - Things they don't teach kids in school - NDC London

  • 1. Windows Azure Web Sites Things they don’t teach kids in school Maarten Balliauw @maartenballiauw
  • 2. Who am I? Maarten Balliauw Technical Evangelist, JetBrains AZUG Focus on web ASP.NET MVC, Windows Azure, SignalR, ... MVP Windows Azure & ASPInsider Big passion: Windows Azure http://blog.maartenballiauw.be @maartenballiauw Shameless self promotion: Pro NuGet http://amzn.to/pronuget2
  • 3. Agenda Windows Azure Web Sites Architecture Project Kudu Kudu kung-fu Application log streaming Managing settings Staging and Production Multi-tier deployments Customizing deployments Running batch files / background processes (*)
  • 5. Web Sites in Seconds Start Simple Your way Go Live start free, scale up and out as you go, friction-free and without the headaches with asp.net, php or node.js, develop on Windows, OSX or Linux deploy live in seconds, easily monitor performance, rapidly diagnose and fix issues
  • 8. Load balancer Layers 1st layer: Windows Azure load balancer 2nd layer: IIS + ARR ARR (disclaimer: not ) “Reverse proxy” Verifies hosting database (plans, quotas, …) Negotiates best node to run your site on Site not used much? Put it on a highly loaded machine
  • 9. Web servers %SYSTEM32%inetsrvconfigapplicationHost.config is taken out of the loop SQL Azure No refreshing of all app pools when file is saved Storage “File share” hosted on other machines Using “WA drive” on blob storage Dynamic website activation service Verifies runtime database (plans, quotas, …) Site not used for a while? Remove it from the server
  • 10. Web Sites are not in IIS. They only are when a request comes in!
  • 11. 1st request (cold site) Web Worker IIS ARR (LB) Azure LB Runtime DB Other databases Storage Controller
  • 12. xth request (hot site) Web Worker IIS ARR (LB) Azure LB Other databases Storage Controller
  • 13. Your app not being used for a while?
  • 14. Provisioning, publishing, metering Provisioning and publishing Storage and database != launching a website on web farm Metering By web servers once a site is loaded Reported back to runtime database
  • 15. Provisioning, publishing, metering IIS ARR (LB) Web Worker SQL Azure Site Site (W3WP.exe) Site (W3WP.exe) (W3WP.exe) Runtime DB Metering Azure LB DWAS Blob storage Other databas es Provisioning / API Frontend Deployment Server Storage Controller X-Drive Windows Azure Worker Role
  • 17. Need more proof? Windows Azure Pack (http://www.microsoft.com/enus/server-cloud/windowsazure-pack.aspx) Or: http://blog.maartenballiauw.be/ post/2012/07/24/Hands-onWindows-Azure-Services-forWindows.aspx
  • 19. Project Kudu “The engine behind git deployments on Windows Azure” Open source (www.github.com/projectkudu/kudu) Provides git deployments Provides builds Provides sandboxing Provides hosting
  • 21. Pointers from the Kudu repository Website extensions (analytics?) Job runner / “worker role” “KuduCalf” (A Kudu is an Antelope. Its baby is a calf. A Kudu Calf is deployed from Kudu.)
  • 24. Log streaming All logs from the LogFiles/Application folder Or configure it when querying: azure log tail <site> -p http Settings DIAGNOSTICS_LASTRESORTFILE -> file to log to when diagnostics go wrong DIAGNOSTICS_LOGGINGSETTINGSFILE -> settings file (json) DIAGNOSTICS_TEXTTRACELOGDIRECTORY -> default folder DIAGNOSTICS_TEXTTRACEMAXLOGFILESIZEBYTES-> log rotation (bytes) DIAGNOSTICS_TEXTTRACEMAXLOGFOLDERSIZEBYTES -> max log size (bytes)
  • 27. Deploying a specific project file demo Multi-tier
  • 28. Multi-tier remarks… One .deployment file per branch [config] project=MultiTier.WebApi/MultiTier.WebApi.csproj How do I deploy all tiers in a separate website? .deployment file per branch and every tier in a branch or customize the build How do I deploy all tiers in the same website? No .deployment file, just use virtual directories
  • 29. Customizing the build process Check https://github.com/projectkudu/kudu/wiki/Deployment-hooks .deployment file [config] command=<whatever command> Write in batch file, bash script, PHP, JavaScript, …
  • 31. What can I do in scripts? A lot :-) (but not too much… there’s a sandbox) Environment variables: DEPLOYMENT_SOURCE DEPLOYMENT_TARGET DEPLOYMENT_TEMP WEBROOT_PATH MSBUILD_PATH + everything you feed it through the management portal
  • 33. Great… but why? We’ve seen the multi-tier scenario We can download stuff (NuGet package restore, pull in external Git repos before build) We can run stuff (msbuild, nuget.exe, curl, php, node, …)
  • 34. What about running unit tests? demo Customizing deployments
  • 35. Note: only in Kudu at this time! demo Running background processes (workers)
  • 37. Moar out of the box REST API https://github.com/projectkudu/kudu/wiki/REST-API Creating a custom handler http://www.windowsazure.com/en-us/develop/python/tutorials/web-sites-withdjango/
  • 39. A private Kudu build in web sites?
  • 40. A private Kudu build in web sites? Build and FTP the artifacts/debug/KuduService to your website Add USE_PRIVATE_KUDU=1 app setting Enjoy the ride! (but don’t call support, you’re on your own) See http://blog.davidebbo.com/2012/06/developing-kudu-locally-and-on-azure.html
  • 42. Key takeaways Windows Azure Web Sites are high density Hosted on Cloud Services Kudu is our best friend Settings and secrets Muliple environments Multiple tiers Build customization Unit tests Worker roles Kudu-in-Kudu

Editor's Notes

  1. Maarten
  2. https://myget-docs-prod-eu-west.scm.azurewebsites.net/Display in browser and go through “environment”COMPUTERNAME “RD….”NUMBER_OF_PROCESSORS -&gt; x-large instancesAll ARR___ variables (cookies for affinity and so on)WAWebSiteSID for determining the website SIDApparently C:\DWASFiles\Sites\WAWSdeepdive seems “da bomb”Browse through the portal and note:All URLS for FTP and SCM are different hostnames and thus potentially a different group of servers
  3. Clone from git, run buildWhile build runs, explain what’s happening (NPM stage, …)Run Kudu.Webas administratorCreate a site, show folders, …KuduExec! – browse the filesystem and so onExplore someCd .. Until no more is possible and dir – show \\10,x,x,x
  4. Show logging applicationExplain nothing special configuredEnable through portalShow stream: azure site log tailstackedlogging(other options are download)Configure verbosity
  5. Create an application and use ConfigurationManager.AppSettings[&quot;MyKey&quot;] tospecify a ‘dev’ variable or somethingShow environment variable printingUpdate setting in portalFTP into the system and note that the web.config is UNTOUCHED!We can use this for storing secrets
  6. Show Hg repository in which I have created two branches: the default one and a “staging” oneConfigure one production websiteConfigure one staging websiteExplain hostnames, scaling, configuration and so on
  7. Explain solution structure: two web projectsCreate .deployment fileAdd:[config]project = MultiTier.WebApi/MultiTier.WebApi.csproj
  8. Create .deployment fileAdd:[config]command=deploy.cmdAdd deploy.cmd@echo offecho Comday is TEH AWESOME!echo We are deploying to %MYENV%- Set environment variable in portal
  9. Too long for slides!Run azure site deploymentscript --basicOr azure site deploymentscript –aspWAPRun through script
  10. Explain unit test projectDeploy with successDeploy with failure