09-PaaS Compute Options Flashcards
Azure App Service Plan
Define set of compute resources for web app to run
Determine performance, price, and features
One or more apps can be configure to run in the same App Service plan
Region where compute resources will be created
# of virtual machine instances
Size of virtual machine instances
Pricing tier
App Service Plan Pricing Tiers
Free
Shared
Basic
Standard
Premium
Isolated
What is Shared Compute
Free and Shared
Run apps on same Azure VM as other App Service apps, and the resources cannot scale out
What is Dedicated Compute
Basic, Standard, Premium
Run apps in the same plan in dedicated Azure VMs
What is Isolated
Runs apps on dedicated Azure VMs in dedicated Azure virtual networks
App Service Plan Scaling
Scale up
Scale out
App Service Plan Scale Out
Adjust available resources based on the current demand
Improve availability and fault tolerance
Scale based on a metric (CPU percentage, memory percentage, HTTP requests)
fill in
Azure App Service
Fully managed environment enabling high productivity development
Platform-as-a-service (PaaS) offering for building and deploying highly available cloud apps for web and mobile
Platform handles infrastructure so developers focus on core web apps and services
Developer productivity using .NET .NET Core, Java, Python and host of others
Provide enterprise-grade security and compliance
Creating an App Service
Name must be unique
Access using azurewebsites.net - can map to a custom domain
Publish code (Runtime Stack)
Publish Docker Container
Linux or Windows
Region closest to your users
App Service Plan
Continuous Deployment
Work in a single source control
Whenever code updates are pushed to source control, then the website or web app will automatically pick up the updates
Continuous deployment workflow publishes the most recent updates from a project
Use portal for continuous deployments from GitHub, Bitbucket, or Azure DevOps
Deployment Slots
Validate code in live environment before publishing it
Can swap from staging from production and vice versa
Creating Deployment Slots
Select whether to clone an app configuration from another deployment slot
When you clone, pay attention to the settings
Not all settings are sticky (endpoints, custom domain names, SSL certificates, scaling)
Review and edit your setting before swapping
Securing an App Service
Authentication
- enable authentication
- log in with 3rd party identity provider
Security
- troubleshoot with diagnostics logs - failed request, app logging
- add an SSL certificate - HTTPS
- define a priority ordered allow/deny list to control network access to the app
- store secrets in the Azure Key Vault
Custom Domain Names
Redirect the default web app URL
Validate the custom domain in Azure
Use the DNS registry for your domain provider
fill in
Backup an App Service
Create app backups manually or on a schedule
Backup the configuration, file content, and database connected to the app
Requires Standard or Premium plan
Backups can be up to 10 GB of app and database content
Configure partial backups and exclude items from the backup
Restore your app on-demand to a previous state, or create a new app
Application Insights
Request rates, deny rates, response time and failure rates
Page view and load performance
User and session counts
Performance counters
Diagnostics and Exceptions
Container vs Virtual Machine Features
Isolation
Operating System
Deployment
Persistent Storage
Fault Tolerance
Azure Container Instance
Here Azure, this is my container, run it
What are Container Groups
Top-level resource in Azure Container Instances
Collection of containers that get scheduled on the same host
Containers in the group share a lifecycle, resources, local network, and storage volumes
What is Docker
Set of PaaS products
Enable developer to host application inside a container
Separate application from environment so it runs the same regardless of where is it hosted
What is container
Standardized “unit of software” that contains everything required for an application to run.
Available on both Linux and Windows and can be hosted on Azure
Docker Hub
Registry that houses the container images
Public registry
Azure Kubernetes Service
You’re responsible only for managing the agent nodes
You pay only for the agent nodes
Enables nodes to be fully managed by Microsoft
Performs simple cluster scaling
Manages health monitoring and maintenance
Pods
Groups of nodes with identical configuration
Nodes
Individual VMs running containerized applications
Pods
Single instance of an application. A pod can contain multiple containers
Deployment
One or more identical pods managed by Kubernetes
Manifest
YAML file describing a deployment
Azure-managed nodes
Master node
Provides core Kubernetes services and orchestration
Customer-managed nodes
Agent node
Run applications and supporting services
AKS Networking
Pods run an instance of your application
Three major networking services - AKS Networking
Cluster IP - Internal IP gets created. For internal traffic. Used by pods inside the cluster
NodePort - port mapping that allows you to access application. Use port and IP on virtual machine
Load Balancer - configure load balancer and external IP address
AKS Storage
Local storage on node is fast and simple to use
Local storage might not be available after pod is deleted
Multiple pods may share data volumes
Storage could potentially be reattached to another pod
AKS Security
Managed service - Limit access with authorized IP ranges, create a private cluster, use RBAD and Azure AD access
Cluster upgrades - Upgrade AKS cluster with cordon and drain
Node - Automatic OS security patches, Azure managed disks, pod security policies
Networks - Define ingress controllers with private internal IP address, filter the flow of traffic with network security groups
Data - Kubernetes secrets for credentials and keys
AKS and Azure Active Directory
Use Azure AD as an integrated identity solution
User service accounts, user accounts, and role-based access control
AKS Scaling
Applications might grow beyond the capacity of a single pod
Kubernetes has built-in autoscaler
Cluster autoscaler scales based on compute resources
Horizontal pod autoscaler scales based on metrics
AKS Scaling to ACI
Azure Container Instance
If you need to rapidly grow your AKS cluster, you can create new pods in Azure Container instance
Virtual Kubelet
Open-source Kubernetes kubelet implementation
Registers itself as a node and allows developers to deploy pods and containers with their own APIs
Supported by an ecosystem of providers