Антон Бойко "azure web apps deep dive"

Post on 24-Jan-2017

241 Views

Category:

Technology

2 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Web Apps deep dive

Anton Boyko Microsoft Azure MVP, MCP Microsoft TE v-anboyk@microsoft.com boyko.ant@live.com

Before we start If you have any questions – do not hesitate and ask them right here and right now.

App Service - one integrated offering

APIAppsEasily build and consume APIs in

the cloud

WebAppsWeb apps that scale with your business

MobileAppsBuild Mobile apps

for any device

LOGICAppsAutomate business

process across SaaS and on-

premises

.NET | Node.js | PHP | Python | Java

Develop apps with…

Web apps architecture

Microso4AzureLoadBalancer

Run<meDatabase

Applica<onDatabase

APIEndpoint

Frontend(IISARR)

PublishEndpoint BlobStorage

FileServer

Metering

DeploymentServer

Quiz

Why do I need to have 2 load balancers that should do more or less the same job?

Quiz

Why do I need to have 2 load balancers that should do more or less the same job?

Azure network load balancer works on L4 of network protocol and is only able to operate with protocol and port number. IIS ARR works on L7 and is able to work on HTTP level. ISS ARR is able to handle “sticky sessions”.

Source control integration

GitHubVisualStudioTeamServices

Git BitBucketCodePlex DropBox FTP

Choose your own adventure!

Generate deployment script

Edit deployment script :: 5. Build IF EXIST "%DEPLOYMENT_TARGET%\gruntfile.js" ( echo "grunt build" pushd "%DEPLOYMENT_TARGET%" call :ExecuteCmd npm install grunt-cli grunt build IF !ERRORLEVEL! NEQ 0 goto error popd )

Quiz

Why having a CPU-intensive long running build process on top of Kudu can kill your app?

Quiz

Why having a CPU-intensive long running build process on top of Kudu can kill your app?

Kudu runs on the same nodes as your web app and they share all resources.

Auto scale

Quiz

Why web apps auto scale feature can kill your app?

Quiz

Why web apps auto scale feature can kill your app?

• Scale is not instantaneous

• Only the web tier scales

It’s not about “don’t use auto scale” for the web apps, it’s more about “use your head”.

Deployment slots

Deployment slots

swapStaging

slot

Produc<onslot

Streamline dev, test and producBon deployment workflow Swap staging and producBon with zero downBme Instantaneous rollback to previous “last known good site” Enables A/B tesBng, conBnuous deployment, staged publishing and much more

WebApp

If you want to live in harmony with the rest of the world – avoid running load tests on different deployment slots of the same web app.

Traffic manager

www.yourapp.com

www.yourapp.com

Quiz

What will traffic manager do if you start receiving 404 or 500 http status codes while trying to access your app main page? Why?

Quiz

What will traffic manager do if you start receiving 404 or 500 http status codes while trying to access your app main page? Why?

Traffic manager uses an endpoint monitoring rules that consist of protocol, port and path. It checks only this particular endpoint for your app health status, it does not listen to all traffic.

Auto heal

Auto heal triggers <system.webServer> <monitoring> <triggers> <!-- Scenario #1: Recycling based on Request Count --> <requests count="1000" timeInterval="00:10:00"/> <!-- Scenario #2: Recycling based on slow requests --> <slowRequests timeTaken="00:00:45" count="20" timeInterval="00:02:00" /> <!-- Scenario #3: Logging an event (or recycling) based on status code(s) --> <statusCode> <add statusCode="500" subStatusCode="100" win32StatusCode="0" count="10" timeInterval="00:00:30"/> </statusCode> <!-- Scenario #4: Taking custom actions (or recycling/logging) based on memory limit --> <memory privateBytesInKB="800000"/>

Auto heal actions </triggers> <!-- Scenario #1 & #2 Action --> <actions value="Recycle"/> <!-- Scenario #3 Action --> <actions value="LogEvent"/> <!-- Scenario #4 Action --> <actions value="CustomAction"> <customAction exe="d:\home\procdump.exe" parameters="-accepteula w3wp d:\home\w3wp_PID_%1%_" /> </actions>

Quiz

Why using auto heal can kill your app?

Quiz

Why using auto heal can kill your app?

If you face an issue when recycling is not enough to fix your app, you will also face infinite recycling loop.

Backup

What can I backup? • Web app content

•  Web app root folder and all folders underneath • Application database

•  Only those application databases, which have connection strings in web app connection string settings, not in web.config

• Configuration settings •  Configuration settings of web app

Quiz

Why I’m not 100% happy with backup?

Quiz

Why I’m not 100% happy with backup?

Usually I put my unstructured content (pictures, video, etc.) into blob storage to avoid storage limit of web app pricing tier. There is no way to backup it using built-in backup feature.

Questions? Anton Boyko Microsoft Azure Ukraine Community Founder Microsoft Azure MVP, MCP Microsoft TE

boyko.ant@live.com @BoykoAnt https://facebook.com/boyko.ant https://youtube.com/user/boykoant https://ua.linkedin.com/in/boykoant

top related