Azure App Services

  • App Services:
    • Azure Web Apps enables you to build and host web applications in the programming language (.NET, .NET Core, Java, Ruby, Node.js, PHP, or Python) of your choice without managing infrastructure.
    • It offers auto-scaling and high availability, supports both WindowsLinux, Docker, and enables automated deployments from FTPGitHub, Git repoVisual Studio Team Services, Bitbucket.
    • Web App name must be unique across all of Azure because the web app is given a URL that ends in .azurewebsites.net.
    • You can improve performance of your state-less apps by turning off the Affinity Cookie, state-full apps should keep Affinity Cookie tuned on for increased compatibility.
    • Always on: Indicates that your web app needs to be loaded at all times. By default, web apps are unloaded after they have been idle. Its recommended that you enable this option when you have continuous web jobs running on the web app.
    • ARR Affinity: You can improve the performance of your stateless apps by turning off the Affinity Cookie. State-ful apps should keep the Affinity Cookie turned on for increased compatibility.
    • App Services Plan:
      • App Service plans represent the collection of physical resources used to host your apps, like location, scale, size and SKU.
      • The cost for the app service plans is based upon per instance, so if you use increase the instances in a selected plan then your cost will multiply as per instances used.
      • Premium:
        • V1( P1, P2, P3): 1/2/4 cores; 1.7/3.5/7 GB RAM; 250 GB storage; 20 instances; 20 slots; Traffic Manager
        • V2(P1, P2, P3): 1/2/4 cores (faster Dv2 series workers); 3.5/7/14 GB RAM; 250 GB SSD storage; 20 instances; 20 slots; Traffic Manager
      • Standard (S1, S2, S3):
        • 1/2/4 cores; 1.7/3.5/7 GB RAM; 50 GB storage; 10 instances;  5 slots; Traffic Manager
      • Basic (B1, B2, B3):
        • 1/2/4 cores; 1.7/3.5/7 GB RAM; 10 GB storage; 3 instances
      • Shared (D1): Shared infrastructure, 1 GB storage
      • Free: Shared infrastructure, 1 GB storage
      • Scale Up: Allows to scale up or down App Service Plan.
      • Scale Out: Allows to increase or decrease instance count.
        • Auto scaling: Can be enabled based upon CPU, Memory, Disk Queue, Http Queue, Data In/Out.
        • It will multiply the cost based upon number of instances increased.
    • Deployment Slots: Deployment slots let you deploy different versions of your web app to different URLs. You can test a certain version and then swap content and configuration between slots.
      • Allows you to test if the deployment works before all users are switched to that new version of the code. This is good last-minute testing to make sure nothing is broken.
      • Auto swap destinations can’t be configured from production slot.
    • Continuous Delivery: Continuous Delivery in Visual Studio Team Services simplifies setting up a robust deployment pipeline for your application. The pipeline builds, runs load tests and deploys to staging slot and then to production.
      • A post deployment action hook is a script/executable that runs after the deployment has completed successfully as part of the default deployment script.
    • Application Insights: helps you to detect and diagnose quality issues in your web apps and web services, and helps you understand what your users actually do with it.
    • Diagnostics logs: Azure Monitor diagnostic logs are logs emitted by an Azure service that provide rich, frequent data about the operation of that service. Azure Monitor makes available two types of diagnostic logs:
      • Application logging (Filesystem): Enable application logging to collect diagnostic traces from your web app code. You need to turn this on to enable the streaming log feature. This setting turn itself off after 12 hours.
      • Application logging (Blob): Logs are collected in the Blob container that’s specified under Storage settings.
      • Web server logging: Gather diagnostic information for your webs server.
      • Detailed error messages: Gather detailed error messages from your web app.
      • Failed request tracing:
      • Tenant logs: these logs come from tenant-level services that exist outside of an Azure subscription, e.g Azure Active Directory logs.
      • Resource logs: these logs come from Azure services that deploy resources within an Azure subscription, e.g Network Security Groups or Storage Accounts.
      • You can export diagnostic logs into:
        • OMS Log Analytics: analyze them with Log analytics.
        • Event Hub: for ingestion by a third-party service or custom analytics solution such as PowerBI.
        • Storage account: for auditing or manual inspection.
      • Set-AzureRmDiagnosticSetting -ResourceId [Resource Id] -Enabled $true
        • -StorageAccountId [storage account id]
        • -ServiceBusRuleId [Service Bus rule id]
        • -WorkspaceId [resource id of the log analytics workspace]
          • (Get-AzureRmOperationalInsightsWorkspace).ResourceId
      • Activity log: provides insight into the operations that were performed on resources in your subscription using Resource Manager, for example, creating a virtual machine or deleting a logic app. The Activity Log is a subscription-level log.
    • SSL certificates:
      • Configure the custom domain
      • Scale up to Basic tier or higher
      • Get an SSL certificate
        • Its signed by a trusted CA (no private CA servers)
        • It contains a private key
        • Its created for key exchange, and exported in .PFX file
        • It uses minimum 2048-bit encryption
        • Its subject name matches the custom domain it needs to secure.
        • Its merged with all the intermediate certificates used by your CA.
      • SSL bindings:
        • Certificates must be associated with your app before you can use them to create a binding.
        • You can upload a certificate you purchased externally or import an App Service Certificate.
        • You may also select  where to use Server Name Identification (SNI) or IP based SSL.
    • PowerShell cmdlets:
      • New-AzureRmResourceGroup  -Name “rg1” -Location “East US”
      • New-AzureRmAppServicePlan  -ResourceGroupName “rg1” -Location “East US” -Name “plan1” -Tier “Standard
      • New-AzureRmWebApp  -ResourceGroupName “rg1” -Location “East US” -Name “webapp1” -AppServicePlan “plan1
      • New-AzureRmWebAppSlot  -ResourceGroupName “rg1” -Name “webapp1” -slot “Staging”
    • Azure CLI:
      • az group create –name rg1 –location “East US
        • az group list -o table
      • az appservice plan create –resource-group rg1 –location “East US
        –name “plan1” –sku FREE

        • az appservice plan list -o table
      • az webapp create –resource-group rg1 –plan plan1 –name webapp1
        • az webapp list -o table
Advertisements

About Ishtiaque

I am IBM Certified Infrastructure Systems Architect, Linux Foundation Certified System Administrator, Oracle Certified Programmer in Java and Web Component Developer, and TOGAF 9 certified with over 10 years of support and development experience in IBM middleware software and Java. Additionally, have a sound grip in databases and OpenStack administration. I hold the following certifications: IBM Certified Infrastructure Systems Architect Linux Foundation Certified System Administrator (LFCS) TOGAF 9 Certified Oracle Certified Expert, Java EE6 Web Component Developer Oracle Certified Professional – Java 6 Programmer ITIL v3 Foundation Certified IBM Certified Solution Architect – Cloud Computing Infrastructure V1 IBM Certified System Administrator – WebSphere Portal V8, V7, V6.1, V6 IBM Certified System Administrator – WebSphere Application Server V7, V6.1 IBM Certified System Administrator – AIX V7 IBM Certified System Administrator – WebSphere MQ V7 IBM Certified Deployment Professional – Business Process Manager Advanced V7.5 IBM Certified Solution Advisor – Cloud Computing Architecture V3 IBM Certified Solution Developer – WebSphere Portal V5.1
This entry was posted in azure. Bookmark the permalink.