SlideShare uma empresa Scribd logo
1 de 44
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/pronuget
Agenda
Windows Azure Web Sites
Architecture
Project Kudu
Kudu kung-fu
Windows Azure Web Sites
Web Sites in Seconds

Start Simple                   Your way               Go Live
start free, scale up and out   with asp.net, php or   deploy live in seconds,
as you go, friction-free       node.js, develop on    easily monitor
and without the headaches      Windows, OSX or        performance, rapidly
                               Linux                  diagnose and
                                                      fix issues
demo
Windows Azure
Web Sites
Architecture
Web Sites are not in IIS until a
      request comes in!
Load balancer
Layers
  1st layer: Windows Azure load balancer
  2nd layer: IIS + ARR


ARR
 “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
1st request (cold site)
                          Web Worker
              IIS ARR
                (LB)




     Azure   Runtime                      Other
      LB       DB                       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
                         Web Worker
          IIS ARR                                 SQL Azure
            (LB)
                             Site
                             Site                 Blob storage
                         (W3WP.exe)
                              Site
                          (W3WP.exe)
                           (W3WP.exe)
          Runtime                                 Windows Azure Worker
            DB                                    Role
                                         Other
Azure                     Metering      databas
 LB                                        es
                           DWAS
        Provisioning /
        API Frontend

                           Storage
        Deployment        Controller    X-Drive
          Server
What I find awesome…
Windows Azure Web Sites runs on Windows Azure Cloud Services
ARR nodes are in fault/update domains
Web Workers are in fault/update domains
Storage nodes are in fault/update domains
Data is on SQL Azure
Files are on blob storage
demo
Let’s find some
proof…
Need more
proof?
Windows Azure
Services for Windows
Server
(http://www.microsoft.com/hosti
ng/en/us/services.aspx)


Or:
http://blog.maartenballiauw.be/
post/2012/07/24/Hands-on-
Windows-Azure-Services-for-
Windows.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
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)
demo
Managing settings
and secrets!
demo
Staging and
production
demo
Multi-tier
Deploying a specific project file
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
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, …
demo
Customizing
deployments
An introduction
What can I do in scripts?
A lot  (but not too much… there’s a sandbox)
Environment variables:
 DEPLOYMENT_SOURCE
 DEPLOYMENT_TARGET
 DEPLOYMENT_TEMP
 MSBUILD_PATH
 + everything you feed it through the management portal
demo
Customizing
deployments
Sample deployment script
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, …)
demo
Customizing
deployments
What about running unit tests?
Need. Moar!
Moar out of the box
REST API
https://github.com/projectkudu/kudu/wiki/REST-API

DropBox support

Creating a custom handler
http://www.windowsazure.com/en-us/develop/python/tutorials/web-sites-with-
django/
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
 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

Mais conteúdo relacionado

Mais de 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...
.NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se...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...
CloudBurst 2019 - Indexing and searching NuGet.org with Azure Functions and S...Maarten Balliauw
 
NDC Oslo 2019 - Indexing and searching NuGet.org with Azure Functions and Search
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 SearchMaarten Balliauw
 
Approaches for application request throttling - Cloud Developer Days Poland
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 PolandMaarten 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...
Indexing and searching NuGet.org with Azure Functions and Search - Cloud Deve...Maarten Balliauw
 
Approaches for application request throttling - dotNetCologne
Approaches for application request throttling - dotNetCologneApproaches for application request throttling - dotNetCologne
Approaches for application request throttling - dotNetCologneMaarten Balliauw
 
CodeStock - Exploring .NET memory management - a trip down memory lane
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 laneMaarten 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...
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...Maarten Balliauw
 
ConFoo Montreal - Approaches for application request throttling
ConFoo Montreal - Approaches for application request throttlingConFoo Montreal - Approaches for application request throttling
ConFoo Montreal - Approaches for application request throttlingMaarten 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...
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...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...
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...Maarten Balliauw
 
DotNetFest - Let’s refresh our memory! Memory management in .NET
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 .NETMaarten Balliauw
 
VISUG - Approaches for application request throttling
VISUG - Approaches for application request throttlingVISUG - Approaches for application request throttling
VISUG - Approaches for application request throttlingMaarten Balliauw
 
What is going on - Application diagnostics on Azure - TechDays Finland
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 FinlandMaarten Balliauw
 
ConFoo - Exploring .NET’s memory management – a trip down memory lane
ConFoo - Exploring .NET’s memory management – a trip down memory laneConFoo - Exploring .NET’s memory management – a trip down memory lane
ConFoo - Exploring .NET’s memory management – a trip down memory laneMaarten Balliauw
 
ConFoo - NuGet beyond Hello World
ConFoo - NuGet beyond Hello WorldConFoo - NuGet beyond Hello World
ConFoo - NuGet beyond Hello WorldMaarten Balliauw
 
Approaches to application request throttling
Approaches to application request throttlingApproaches to application request throttling
Approaches to application request throttlingMaarten Balliauw
 
NuGet beyond Hello World - DotNext Piter 2017
NuGet beyond Hello World - DotNext Piter 2017NuGet beyond Hello World - DotNext Piter 2017
NuGet beyond Hello World - DotNext Piter 2017Maarten Balliauw
 
Exploring .NET memory management (iSense)
Exploring .NET memory management (iSense)Exploring .NET memory management (iSense)
Exploring .NET memory management (iSense)Maarten Balliauw
 
Exploring .NET memory management - JetBrains webinar
Exploring .NET memory management - JetBrains webinarExploring .NET memory management - JetBrains webinar
Exploring .NET memory management - JetBrains webinarMaarten Balliauw
 

Mais de Maarten Balliauw (20)

.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...
.NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se...
 
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...
CloudBurst 2019 - Indexing and searching NuGet.org with Azure Functions and S...
 
NDC Oslo 2019 - Indexing and searching NuGet.org with Azure Functions and Search
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
 
Approaches for application request throttling - Cloud Developer Days Poland
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
 
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...
Indexing and searching NuGet.org with Azure Functions and Search - Cloud Deve...
 
Approaches for application request throttling - dotNetCologne
Approaches for application request throttling - dotNetCologneApproaches for application request throttling - dotNetCologne
Approaches for application request throttling - dotNetCologne
 
CodeStock - Exploring .NET memory management - a trip down memory lane
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
 
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...
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
 
ConFoo Montreal - Approaches for application request throttling
ConFoo Montreal - Approaches for application request throttlingConFoo Montreal - Approaches for application request throttling
ConFoo Montreal - Approaches for application request throttling
 
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...
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...
 
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...
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...
 
DotNetFest - Let’s refresh our memory! Memory management in .NET
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
 
VISUG - Approaches for application request throttling
VISUG - Approaches for application request throttlingVISUG - Approaches for application request throttling
VISUG - Approaches for application request throttling
 
What is going on - Application diagnostics on Azure - TechDays Finland
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
 
ConFoo - Exploring .NET’s memory management – a trip down memory lane
ConFoo - Exploring .NET’s memory management – a trip down memory laneConFoo - Exploring .NET’s memory management – a trip down memory lane
ConFoo - Exploring .NET’s memory management – a trip down memory lane
 
ConFoo - NuGet beyond Hello World
ConFoo - NuGet beyond Hello WorldConFoo - NuGet beyond Hello World
ConFoo - NuGet beyond Hello World
 
Approaches to application request throttling
Approaches to application request throttlingApproaches to application request throttling
Approaches to application request throttling
 
NuGet beyond Hello World - DotNext Piter 2017
NuGet beyond Hello World - DotNext Piter 2017NuGet beyond Hello World - DotNext Piter 2017
NuGet beyond Hello World - DotNext Piter 2017
 
Exploring .NET memory management (iSense)
Exploring .NET memory management (iSense)Exploring .NET memory management (iSense)
Exploring .NET memory management (iSense)
 
Exploring .NET memory management - JetBrains webinar
Exploring .NET memory management - JetBrains webinarExploring .NET memory management - JetBrains webinar
Exploring .NET memory management - JetBrains webinar
 

Último

Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 

Último (20)

Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 

Windows Azure Web Sites - Things they don’t teach kids in school

  • 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/pronuget
  • 3.
  • 4. Agenda Windows Azure Web Sites Architecture Project Kudu Kudu kung-fu
  • 6. Web Sites in Seconds Start Simple Your way Go Live start free, scale up and out with asp.net, php or deploy live in seconds, as you go, friction-free node.js, develop on easily monitor and without the headaches Windows, OSX or performance, rapidly Linux diagnose and fix issues
  • 9. Web Sites are not in IIS until a request comes in!
  • 10. Load balancer Layers 1st layer: Windows Azure load balancer 2nd layer: IIS + ARR ARR “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
  • 11. 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
  • 12. 1st request (cold site) Web Worker IIS ARR (LB) Azure Runtime Other LB DB databases Storage Controller
  • 13. xth request (hot site) Web Worker IIS ARR (LB) Azure LB Other databases Storage Controller
  • 14. Your app not being used for a while?
  • 15. 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
  • 16. Provisioning, publishing, metering Web Worker IIS ARR SQL Azure (LB) Site Site Blob storage (W3WP.exe) Site (W3WP.exe) (W3WP.exe) Runtime Windows Azure Worker DB Role Other Azure Metering databas LB es DWAS Provisioning / API Frontend Storage Deployment Controller X-Drive Server
  • 17. What I find awesome… Windows Azure Web Sites runs on Windows Azure Cloud Services ARR nodes are in fault/update domains Web Workers are in fault/update domains Storage nodes are in fault/update domains Data is on SQL Azure Files are on blob storage
  • 19. Need more proof? Windows Azure Services for Windows Server (http://www.microsoft.com/hosti ng/en/us/services.aspx) Or: http://blog.maartenballiauw.be/ post/2012/07/24/Hands-on- Windows-Azure-Services-for- Windows.aspx
  • 21. 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
  • 25. 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)
  • 29. 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
  • 30. 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, …
  • 32. What can I do in scripts? A lot  (but not too much… there’s a sandbox) Environment variables: DEPLOYMENT_SOURCE DEPLOYMENT_TARGET DEPLOYMENT_TEMP MSBUILD_PATH + everything you feed it through the management portal
  • 34. 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, …)
  • 37. Moar out of the box REST API https://github.com/projectkudu/kudu/wiki/REST-API DropBox support Creating a custom handler http://www.windowsazure.com/en-us/develop/python/tutorials/web-sites-with- django/
  • 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 Kudu-in-Kudu
  • 43. http://blog.maartenballiauw. be @maartenballiauw http://amzn.to/pronuget Thank you!

Notas do Editor

  1. Maarten
  2. Launch PhpStorm, create new websiteExplain command line toolsazure site create WAWSdeepdive --location &quot;North Europe&quot; --gitConfigure gitAdd index.php &lt;phpphpinfo();Commit and pushDisplay 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 serversazure site delete WAWSdeepdive
  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 tailmysite(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 Stacked 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