Compute Flashcards
What is an Azure Virtual Machine (VM)?
- VMs provide IaaS in the form of a virtualised service
- Customer can customise all of the software running on the VM (OS, custom software, custom hosting configs)
- Customer needs to configure, update and maintain all software
- Azure provides preconfigured VM images to allow for rapid provisioning
Scaling VMs
- VM Scale Sets: allow for the creation and management of identical, load-balanced VMs. Load balancer automatically deployed with VM Set so that resources are being used efficiently
- VM Availability Sets: ensures that VMs stagger updates and have varied power and network connectivity, preventing the loss of all VMs with a single network or power failure.
Examples of when to use VMs
- Testing and development: quickly create and tear down different OS and application configurations.
- Run applications in the cloud: as opposed to creating a traditional infrastructure. Allows for handling fluctuations in demand.
- Extending a datacenter to the cloud
- During DR: If a primary datacenter fails, a customer can create VMs to run critical applications then shut down the VMs when the datacenter becomes available again
- Lift-and-shift migrations to the cloud
VM resources
When provisioning a VM, the customer picks the following resources:
- Size (number of processor cores, amount of RAM etc)
- Storage disks (hard disk drives, solid state drives etc)
- Networking (virtual network, public IP address, port configurations)
Azure virtual desktop
- Another type of VM: a desktop and application virtualisation service that runs on cloud
- Provides centralised security for users’ desktops with Microsoft Entra ID.
- Data and apps are separated from the local hardware. The actual desktop and apps are running in the cloud, meaning the risk of confidential data being left on a personal device is reduced.
What are containers?
- A virtualisation environment that can be run on a single physical or virtual host.
- Unlike virtual machines, you don’t manage the OS for a container
- Containers are lightweight (much lighter than VMs) and designed to be created, scaled out and stopped dynamically
Azure Container Instances
- Simplest way to run a container in Azure
- Don’t have to manage VMs
- PaaS offering
- Upload containers and the service runs them
Azure Container Apps
Similar to Azure Container Instances but allow the ability to incorporate load balancing and scaling (more elasticity)
Azure Kubernetes Service
AKS is a container orchestration service.
- Manages the lifecycle of containers
When to use containers
- To achieve a microservice architecture (solutions are broken into smaller, independent pieces)
- E.g. split a website into a container for the front end, another for the backend, another for storage. If the back-end reaches capacity, you could scale it separately to the rest of the application.
Azure Functions
- Event-driven, serverless compute that doesn’t require maintaining VMs or containers.
- Does not require anything to be “running”: an event wakes the function and runs it
- Use when only concerned about running the application code and not the underlying infra
- Response to an event (e.g. a REST request)
- Scale automatically based on demand
- Runs code when triggered, then deallocates resources when finished, so customer is only charged for CPU when the function runs
- Stateless functions: behave as if they restart every time
- Stateful functions: context is passed through the function to track prior activity
Azure App Service
- Allows customer to build and host certain types of applications in any programming language without managing infra
- App Service handles deployment & management, securing endpoints, scaling, load-balancing and high availability.
- Four types of App Service:
- Web Apps
- API Apps
- WebJobs
- Mobile Apps