azure websites

37
MICROSOFT AZURE WEBSITES Kashif Imran [email protected]

Upload: kashif-imran

Post on 29-Jun-2015

317 views

Category:

Technology


6 download

DESCRIPTION

Microsoft Azure Websites

TRANSCRIPT

Page 1: Azure Websites

MICROSOFT AZURE WEBSITES

Kashif Imran

[email protected]

Page 2: Azure Websites

AZURE WEBSITES

Managed Platform-as-a-Service (PaaS) to build web apps

Page 3: Azure Websites

AZURE WEBSITES FEATURES

Multi language support (ASP.NET, Java, PHP, Node.js, Python)

SQL, MySQL, DocumentDB, MongoDB, Redis, Azure Table Storage

Access On-Premises and Cloud Resources including SQL Server using Hybrid Connections and Virtual Network

99.9% uptime with a single instance website

Vertical and Horizontal Scale, Auto Scaling

Custom Domains

SSL

IP and Domain restrictions

Continuous Deployment (VSO, GIT), FTP, Visual Studio, DropBox, BitBucket, Codeplex, Any external Git and Mercurial repository

Diagnostics Logging, Remote Debugging

Testing and Staging environments

Backup

Page 4: Azure Websites

DemoNew Empty Site in Azure

Websites

Page 5: Azure Websites

DemoNew ASP.NET Web App in

Azure Websites

Page 6: Azure Websites

DemoNew Azure Website from

Gallery

Page 7: Azure Websites

PRICING – FREE AND SHARED

http://azure.microsoft.com/en-us/pricing/details/websites/

Page 8: Azure Websites

PRICING - STANDARD

http://azure.microsoft.com/en-us/pricing/details/websites/

Page 9: Azure Websites

FEATURE COMPARISON

Page 10: Azure Websites

WEB HOSTING PLAN AND RESOURCE GROUPS

Page 11: Azure Websites

AZURE EXECUTION MODELS

http://azure.microsoft.com/en-us/documentation/articles/choose-web-site-cloud-service-vm/

Page 12: Azure Websites

AZURE EXECUTION MODELS

Page 13: Azure Websites

AZURE WEBSITES ARCHITECTURE

Page 14: Azure Websites

COLD SITE PROVISIONING

Cold Site: A site that is published but not launched (is not provisioned on a web server).

In a cold site, the site’s metadata is stored in the runtime database and the site’s contents are stored by the Storage Controller. This happens when you first publish your website.

Hot Site: A site that is provisioned on a web server and actively used. This happens when you access the site, and it is dynamically provisioned by WAWS on one of the web servers.

Page 15: Azure Websites

COLD SITE PROVISIONING

Page 16: Azure Websites

SERVING HOT SITE

In case of a Hot Site requests , the website is already provisioned on the web server and ARR maintains the website’s metadata in its cache. When the request comes in, ARR forwards this request to the appropriate web server without retrieving metadata from the runtime database. The website then serves the request normally. Because the site is already provisioned and the metadata is cached in ARR, most of the calls to the runtime database are eliminated.

Page 17: Azure Websites

ARR INSTANCE AFFINITY COOKIE

Sticky Session

Enabled by default (Helps if you using SessionState)

Disable in web.Config

http://ppe.blogs.msdn.com/b/windowsazure/archive/2013/11/18/disabling-arr-s-instance-affinity-in-windows-azure-web-sites.aspx

Page 18: Azure Websites

DemoARR Instance Affinity

Page 19: Azure Websites

CONTINUOUS DEPLOYMENT

Visual Studio Online (SCM as SaaS)

Git

DropBox

BitBucket

Codeplex

Any external Git and Mercurial repository

Page 20: Azure Websites

DemoContinuous Deployment

using Visual Studio Online

Page 21: Azure Websites

MONITORING

Website Metrics

Notification Rules

Client Analytics

http://azure.microsoft.com/en-us/documentation/articles/web-sites-monitor/

Page 22: Azure Websites

DemoMonitoring and Alters

Page 23: Azure Websites

TROUBLESHOOTING AZURE WEBSITES

Custom Errors/Remote View <CustomError mode=“Off”></CustomErrors> Web.config transform Live web.config editing

Remote Debugging Not recommended in production (Traffic will tie up for single instance) Random instance get attached to debugger Bandwidth and pricing Automatically disabled after 48 hours

Diagnostic Logging

Page 24: Azure Websites

DemoLive Web.config Editing and Remote Debuging

Page 25: Azure Websites

DIAGNOSTIC LOGGING

Application Diagnostics Site Diagnostics Deployment (/LogFiles/Git)

Page 26: Azure Websites

APPLICATION DIAGNOSTICS

Application tracing logs System.Diagnostics.Trace.TraceError("If you're seeing this, something

bad happened"); 25-100MB on file system /LogFiles/Application/ (App settings to modify default location:

DIAGNOSTICS_TEXTTRACELOGDIRECTORY) {Date} PID[{process id}] {event type/level} {message} 2014-01-30T16:36:59 PID[3096] Error Fatal error on the page! Table or Blog Storage

http://azure.microsoft.com/en-us/documentation/articles/web-sites-enable-diagnostic-log/#understandlogs

Page 27: Azure Websites

SITE DIAGNOSTICS

Web Server logs (all HTTP transactions using W3C extended log format file) /LogFiles/http/RawLogs

Detailed error messages Logs detailed error information for HTTP status codes that indicate a failure. /LogFiles/DetailedErrors/

Failed request tracing logs Logs detailed information on failed requests including a trace of IIS

components use to process request and time taken. /LogFiles/W3SVC#########

http://azure.microsoft.com/en-us/documentation/articles/web-sites-enable-diagnostic-log/#understandlogs

Page 28: Azure Websites

DemoApplication and Site

Diagnostics

Page 29: Azure Websites

KUDU (SITE CONTROL MANAGEMENT)

Yoursite.scm.azurewebsites.net

Open Source

https://github.com/projectkudu/kudu

Environment

Debug Console

Process Explorer

Tools Diagnostic Dump Log Stream Web Hooks

Site Extensions

http://azure.microsoft.com/blog/2014/03/28/windows-azure-websites-online-tools-you-should-know-about-2/

Page 30: Azure Websites

DemoKudu (Site Control

Management)

Page 31: Azure Websites

DAAS

Yoursite.scm.azurewebsites.net/DaaS

Isolate app specific issues Website responding slowly Random requests timing out Web page(s) hang

Collect and analyze App process Memory dumps HTTP Logs Event Logs

\home\data\DaaS\Reports, Logs

https://<YourSiteName>.scm.azurewebsites.net/Zip/data/DaaShttp://azure.microsoft.com/blog/2014/07/08/daas/

Page 32: Azure Websites

DemoDAAS

Page 33: Azure Websites

DIAGNOSTICS REFERENCES

http://azure.microsoft.com/en-us/documentation/articles/web-sites-dotnet-troubleshoot-visual-studio/

http://azure.microsoft.com/en-us/documentation/articles/web-sites-enable-diagnostic-log/

http://blog.amitapple.com/post/2014/06/azure-website-logging/#.VCGNMPldV8E

http://blogs.msdn.com/b/microsoft_press/archive/2014/01/29/from-the-mvps-diagnostics-and-logging-in-windows-azure-web-sites.aspx

http://www.hanselman.com/blog/StreamingDiagnosticsTraceLoggingFromTheAzureCommandLinePlusGlimpse.aspx

Page 34: Azure Websites

CUSTOM DOMAINS

CNAME awverify.yoursubdomain.yourdomain.org to

awverify.yourwebsite.azurewebsites.net. awverify.www.fsu.edu to awverify.fsuwww.azurewebsites.net

Page 35: Azure Websites

SECURITY

SSL IP-based: Sites can have one certificate configured per IP address and port number. SNI based: Server Name Indication (SNI) is an extension to the TLS protocol that

indicates what hostname the client is attempting to connect to at the start of the handshaking process. This allows a server to present multiple certificates on the same IP address and port number. Allowing multiple secure (HTTPS) websites (or any other Service over TLS) to be served off the same IP address without requiring all those sites to use the same certificate.

Dynamic IP Address restrictions http://azure.microsoft.com/blog/2013/08/27/confirming-dynamic-ip-address-

restrictions-in-windows-azure-web-sites/

IP and Domain restrictions http://azure.microsoft.com/blog/2013/12/09/ip-and-domain-restrictions-for-windows-

azure-web-sites/

Page 36: Azure Websites

BEST PRACTICES

Design Scalable and Resilient Architecture

Do not use local session state

Use caching (Azure Redis)

Identify bottlenecks

Load test your app

Use auto scaling

Use analytics, monitoring and alerts

Use Traffic Manager and CDN to deliver content locally

Automate deployment

Use staging and production environments

Setup automatic failover

Backup and test restores

Page 37: Azure Websites

QUESTIONS?