Sunday, October 1, 2017

[AZURE 70-534 Cheat Sheet and Exam Notes Part-5] Design Azure Web and Mobile Apps

Series Index 
  1. Azure ARM , networking and GLOBAL Infrastructure (2017-10-01)
  2. Securing Resources and Azure Security (2017-10-01)
  3. Design an application storage and data access strategy (2017-10-01) 
  4. Design advanced applications (2017-10-01)
  5. Design Azure Web and Mobile Apps (2017-10-01)
  6. Design a management, monitoring, and business continuity strategy (2017-10-01)
  7. Architect an Azure Compute infrastructure (2017-10-01)

Designing Web Apps 

App Service Vs Cloud Service Vs Virtual Machine 
Scalable Web Apps, Mobile Apps, API Apps, and Logic Apps for any device
Highly available, scalable n-tier cloud apps with more control of the OS
Customized Windows and Linux VMs with complete control of the OS                                        

Azure Web Apps 

  1. Web Apps are available in 5 tiers: free/shared/basic/standard/premium.
    1. web/mobile/API apps (10/100/unlimited/unlimited/unlimited),
    2. logic apps (10/10/10/20 per core/20 per core,
    3. integration options (dev/test up to basic; 
    4. Standard connectors for Standard; 
    5. Premium Connectors and BizTalk Services for premium),
    6. disk space (1GB/1GB/10GB/50GB/500GB), 
    7. maximum instances (-/-/3/10/50), 
    8. App Service environments (Premium only), 
    9. SLA (Free/shared none; Basic 99.9; Standard and Premium 99.95%)
  2. Resource Group and Web Hosting Plan are used to group websites and other resources in a single view; can also add databases and other resources; deleting a resource group will delete all of the resources in it.
  3. Instance types:
    1. Free F1.
    2. Shared D1.
    3. Basic B1-B3 1 core, 1.75GB RAM, 10GB storage x2 cores and RAM (2/3.5; 4/7) – VMs running web apps.
    4. Standard S1-S3 same cores and RAM but more storage (50GB).
    5. Premium P1-P4 same again but 500GB storage (P4 is 8 cores, 14GB RAM).
  4. Other things to configure:
    • .NET Framework version.
    • PHP version (or off).
    • Java version (or off) – use web container version to chose between Tomcat and Jetty; enabling Java disables .NET, PHP and Python.
    • Python version (or off).
  5. Scale web apps 
    1. by moving up plans: Free-Shared-Basic-Standard – changes apply in seconds and affect all websites in web hosting plan. No real scaling for Free or Shared plans. Basic can change instance size and count. Standard can autoscale based on schedule or CPU – min/max instances (checked every 5 mins).
    2. Scale database separately.
  6. SSL certificates – can add own custom certs (2 options – server name indication with multiple SSL certs on a single VM; or IP SSL for older browsers but only one SSL cert for IP address).
  7. Site extensions – no RDP access to the VM, so tools for website: Visual Studio Online for viewing code or phpMyAdmin.
  8. Webjobs 
    1. allow running programs or scripts on website (like cron in Linux or scheduled task in Windows) – one time, schedules or recurring.
    2. Can use .cmd, .bat or .exe; .ps1, .sh., php, .py, .js
  9. Development Environment 
    1. Visual Studio 2013 plus support one click deployment 
    2. Deployment pipeline can be automated and can flip environments when move from staging to production (flips virtual IP). Can flip back if there are issues. 
  10. Debugging
    1. Azure Application Insight is used for debugging for some extra fee.
    2. You can connect to Console session of Web App Host  using simple commend line environment provided by azure 
    3.  Debugger can be attached remotely 
    4. KUDO can be used for Web based Debugging 
      1. it provide a page consistent of 
        1. Environment Information 
        2. Process Explorer  
        3. Site Extension
        4. Diagnostics Dump
        5.  Log Stream 
        6. WebJob Dashboard 
        7. Web Hooks 
        8. Download Deployment Scripts 
        9. Can be used to initiate Powershell Session to host
  11. Supported Language
    1. .Net , Java , Node.Js, PHP, Python
  12. Monitoring web app
    1. Monitoring is supported via metrics in the portal.

Azure Scaling Web Apps 

  1. Supported push button in scale up and scale out mode

Azure Scaling Database Tier 

  1. Database load are measured based on (Database transaction units) DTU 
  2. Azure SQL Support GEO Replication 
    1. Standard replication - Disaster recovery only , Deprecated in April 2017
    2. Active Replication - Read Replicas 
  3. If replication is not required the upward scale can be performed i.e. DTU increases 
  4. DTU is charged based on allocation 
  5. Elastic Database Pool 
    1. It is way to allocate shred DTU to a group of databases to that sudden burst of load can be handled without upgrading the database tier.
    2. It is like setting up burst mood that provide predictable billing 
    3. it is region specific and once server can be part of multiple pool
  6.  Database Sharding 
    1. This is one of the ways for horizontal scaling 
    2. Split the database in ti multiple small one 
    3. Split Marge tool can help in this 
    4. Mix of Database Tier can be used 
    5. Need Configure App logic to use appropriate instance 
    6. Other than performance it can also be used for  compliance purpose across the region 

Web Application Deployment 

  1. Azure Site Extensions 
    1. Can add available third party  component to application such as logging 
    2. Also allow to create your own extension 
  2.  Deployment Option 
    1. FTP 
      1. Any FTP Client is Support 
      2. Do not Support version control 
    2. KUDU
      1. Support Git , One Drive , Drop Box etc
      2. Version control , restore , web-hooks, Content Sync  
      3. Local Git supported 
    3. Web Deploy 
      1. Direct Visual Studio Deploy 
      2. Support Diff only Deployment 
      3. Binaries are pre built before deploy 
      4. Package are ZIP includes all codes and dependencies 
  3. App Service Plan 
    1. Allows apps to share features and capacity 
    2. Also to allocate exclusive hosting VM capacity to apps 
    3. There are five pricing tiers free to premium
    4. Pricing tier can be changed any time    
    5. Allow changing number of VMs 
    6. Apps and App service must me in same subscription and and geographic location 
    7. One Web App can only be associated with one app service plan 
    8. App can be moved to different plan  
    9. To move web App to other region you have to clone it 
  4. Resource Group 
    1. Logical grouping of resources  
    2. Works as subset of resources for an application 
    3. Allows grouping of resources for billing and management purpose
    4. One resource can only belongs to single RG 
    5. resources can be in separate region 
    6. Deployment template can be created for resource group 

High Availability Web Apps 

  1. Azure Traffic Manager 
    1. Controls distribution of traffic to endpoints including cloud services , websites external sites etc
    2. Support Three Load Balancing models 
      1. Failover 
      2. Performance 
      3. Round Robin 

Business Continuity Plan 

  1. Update with Minimal Downtime 
    1. Azure Provide Deployment Slot that actually Swapping of Production IP Address 
  2. Backup and restore
    1. Builtin feature of Azure 
    2. Support Up to 10 GB (Website + DB)
    3. backup include -
      1. Web Apps Configuration 
      2. Web App File Contents 
      3. Azure Database (SQL or My SQL)
    4. Manual and schedule both are supported 
    5. Output of back is 
      1. XML Config File 
      2. ZIP file with Site and DB contents in BAKPAK file 
      3. BAKPAK  file can be restored locally /on prem
    6. Backup support file and folder filters 
    7. Differential backup and parts backup is supported 
  3. Restoring Web Apps 
    1. Database restore can be don on same production slot or new one 
    2. Swap can be used in case of restore to new slot (recommended )

Azure Cloud Services 

Cloud Services is an example of Platform-as-a-Service (PaaS). Like App Service, this technology is designed to support applications that are scalable, reliable, and cheap to operate. Just like an App Service is hosted on VMs, so too are Cloud Services, however, you have more control over the VMs. You can install your own software on Cloud Service VMs and you can remote into them.
  1. Cloud Service roles
    1. Web role 
    2.  Automatically deploys and hosts your app through IIS.
    3. Worker role
      1. Does not use IIS and runs your app standalone.For more complex, multi-tier apps.
      2.  for back-end (synchronous, perpetual tasks – independent of user interaction; uses polling, listening or third party process patterns).
  2. Upload code and Azure manages infrastructure (provisioning, load balancing, availability, monitoring, patch management, updates, hardware failures…)
  3. 99.95% SLA (min 2 role machines)
  4. Auto-scale based on CPU or queue.
  5. Communicate via internal endpoints, Azure storage queues, Azure Service Bus (pub/sub model – service bus creates a topic, published by web role and worker role subscriber is notified).
  6. Availability: fault domain (physical – power, network, etc.) – cannot control but can programmatically query to find out which domain a service is running in. In ASM, normally 0 or 1. ASM automatically distributes VMs across fault domains.
  7. Upgrade domain (logical – services stopped one domain at a time) – default is 5, can be changed.
  8. If have web and worker roles, automatically placed in Availability set.
  9. Azure Service Definition Schema (.csdef file) has definitions for cloud service (number of web/worker roles, communications, etc.), service endpoints, config for the service – changes required restart of services.
  10. Azure Service Configuration Schema (.cscfg file) runtime components, number of VMs per web/worker role and size etc. – changes do not require service restart.
  11. Deployment pipeline as for Web Apps.

Design Mobile Application 

Azure Mobile Services (Mobile Data Access)

  1. Offers cloud based storage for mobile apps
  2. support both Node or .Net
  3. Support Proxy (Data Classes) for SQL Data Base , technically it create web-service 
  4. Support Many different data source like Azure SQL, Blob , Table and Mongo DB
  5. Support Hybrid Service 
  6. Support Social providers for authentication 
  7. Support Several Push Notification Services 
    1. Windows Push Notification Services (WNS)
    2. Microsoft Push Notification Service (MPNS)
    3. Apple Push Notification Service (APNS)
    4. Google Content Notification 
    5. Azure Notification Hub 
  8. Also support Git integration 
  9. Can be consumed from cross platform client by adding Mobile Service Client Library reference in you project.
  10. Offline Sync is supported via SQL Lite 
  11. Mobile service support custom coding and create more feature to API
  12. Mobile Service Security 
    1. Authorization has four modes 
      1. Application Key Required 
      2. Everyone - public
      3. Authenticated user (ID +Token)
      4. Admin and Other Script (Need Master key from mobile service)
    2. Authentication provider 
      1. Azure AD 
      2. MS Account 
      3. Facebook 
      4. Twitter 
      5. Google
    3. More than one identity provider are supported by mobile service 
    4. Log in request made to LoginAsycn end point that in turn provide User variable containing  claims like user level , and user id  
    5. Azure provide and AD Authentication Library as abstraction layer for client apps that support featured like token cache and automatic token refresh 

 Azure Application Notification Services

  1. There are two way to push a notification on device 
  2. Push Notification Service (discussed above) 
    1. Notification services are specific to Device provider 
  3. Notification Hub 
    1. Notification Hub is latest approach to implement push service 
    2. Fully Managed and highly scalable service 
    3. it is abstraction over push notification service and vendor independent 
    4. Allow collect data back from devices like GPS location 
    5. Support Message Template 

Azure Application Services 

  1. Azure offer various application service some of them are renamed and some new 
  2. Web App , Mobile Apps, BizTalk API apps, Api Apps, Logic App (Workflow) are key name to highlight 
  3. App Service Plan 
    1. Service belongs to five pricing tier called , Free, Shared , Basic , Standard , Premium 
    2. Only one service plan can be associated at any time 
  4. Azure API Apps 
    1. Builtin Support for swagger 
    2. automatic generation of client code 
    3. CORS support out of the box 
    4. Support for azure logic apps 
    5. Support built in access level 
      1. Internal , Public , and Public Authenticated
    6. Support Scale Up and Out 
    7. Security 
      1. Azure Ad is used for authentication 
      2. Support  express and Advance mode of integration 
      3. Advance mode requires AD App Client ID and Issues URI 
  5.  WebJobs  Apps 
    1. Allow execution of script on host 
    2. Deployed via Zip, FTP or IDEs
    3. an run on demand or scheduled 

Azure Website and Azure VNETs

  1. Azure website can not be placed in VNET but can access resources on VNET through a special VPN Configuration 
  2. VNET Can be used for On Premise access and support boath TCP and UDP
  3. In order website can access VNET must have 
    1. Dynamic Gateway 
    2. Point to Site Enabled 
    3. V1 VNET is support not classic VNET 
    4. Website Must use VNET DNS server 
    5. Same VNET can be used by multiple APPS
    6. Requires STD or Premium pricing plan 
    7. Azure Website and VNET for not support Drive Mounting , AD Integration , NetBois, Express Route 
    8. Hybrid Connection Manager (HCM) can be used to allow Website/VPN access via Express Route 
      1. HCM Can only be installed on Windows 
      2. Max Five Instances of HCM 
      3. Only Support TCP (No UDP)
      4. Use with express route 

Cloud Services Vs Standalone Cloud Services

  1. It is one of the way to organised resources on Azure
  2. Each Cloud Service has a unique public DNS and IP address 
  3. Cloud Service without virtual network is called standalone 
  4. VMs in standalone cloud service must communicate over the intenet
  5.  Standalone cloud service can not participate in VPN
  6. Cloud Service are part of classic deployment that is being replaced with Azure Resource Manager that actually uses Resource Group 
====================================================================

  1. Web Apps Vs IAAS VM Vs Cloud Service -TBD
    1. TBD

1 comment: