azure websites
DESCRIPTION
Microsoft Azure WebsitesTRANSCRIPT
AZURE WEBSITES
Managed Platform-as-a-Service (PaaS) to build web apps
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
DemoNew Empty Site in Azure
Websites
DemoNew ASP.NET Web App in
Azure Websites
DemoNew Azure Website from
Gallery
PRICING – FREE AND SHARED
http://azure.microsoft.com/en-us/pricing/details/websites/
PRICING - STANDARD
http://azure.microsoft.com/en-us/pricing/details/websites/
FEATURE COMPARISON
WEB HOSTING PLAN AND RESOURCE GROUPS
AZURE EXECUTION MODELS
http://azure.microsoft.com/en-us/documentation/articles/choose-web-site-cloud-service-vm/
AZURE EXECUTION MODELS
AZURE WEBSITES ARCHITECTURE
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.
COLD SITE PROVISIONING
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.
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
DemoARR Instance Affinity
CONTINUOUS DEPLOYMENT
Visual Studio Online (SCM as SaaS)
Git
DropBox
BitBucket
Codeplex
Any external Git and Mercurial repository
DemoContinuous Deployment
using Visual Studio Online
MONITORING
Website Metrics
Notification Rules
Client Analytics
http://azure.microsoft.com/en-us/documentation/articles/web-sites-monitor/
DemoMonitoring and Alters
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
DemoLive Web.config Editing and Remote Debuging
DIAGNOSTIC LOGGING
Application Diagnostics Site Diagnostics Deployment (/LogFiles/Git)
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
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
DemoApplication and Site
Diagnostics
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/
DemoKudu (Site Control
Management)
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/
DemoDAAS
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
CUSTOM DOMAINS
CNAME awverify.yoursubdomain.yourdomain.org to
awverify.yourwebsite.azurewebsites.net. awverify.www.fsu.edu to awverify.fsuwww.azurewebsites.net
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/
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
QUESTIONS?