Azure V: Compute, App Hosting & the AZ-104 exam: interview questions
The question you are most likely to get for each topic, a model answer, and what else comes up.
An Azure web app went down right after a release. Walk me through how you would find out what happened. Mid
First the activity log for the app and its plan around the release time: a slot swap, a settings change, a scale operation, with the caller. Then compare the production app settings with what they were - a value that was not a slot setting moves with the code. Check the app's metrics (Http5xx, response time) and its logs in the workspace if a diagnostic setting sends them. If the swap caused it, swap back first, then fix the setting and mark it sticky in both slots.
Also asked: What is the difference between an availability set and an availability zone? · How do you give a VM in a private subnet admin access without a public IP? · How would you make sure an alert really pages someone?
What is the difference between Incremental and Complete deployments? Mid
Incremental, the default, creates and updates what the template lists and leaves everything else in the resource group alone. Complete makes the group match the template and deletes what is not in it. I only use Complete on a group that one template owns, and always after az deployment group what-if with --mode Complete - the - lines are exactly what would be deleted.
Also asked: How do you pass different values for dev and prod to the same template? · What does uniqueString() return and why is it useful for names? · How do you find out why a template deployment failed?
Learn it: 33.1 ARM templates: read, change, preview, deploy, export
Bicep or Terraform - which would you pick for an Azure platform, and why? Mid
Both describe the desired state and preview changes - az deployment group what-if for Bicep, terraform plan for Terraform. Bicep is Azure-only, compiles to an ARM template, keeps no state file because Azure is the state, and supports every new API version on day one. Terraform works across providers and keeps a state file, which gives drift detection and imports but has to be stored and locked. Azure-only team: either; multi-cloud platform team: Terraform.
Also asked: How do you convert an existing ARM template to Bicep? · What does a decorator like @allowed do in Bicep? · How do you handle different environments in Bicep?
Learn it: 33.4 Bicep: the same deployments, in a language people can read
A VM deployment fails with SkuNotAvailable. What do you do? Mid
Check az vm list-skus for that size in the region and zone: the Restrictions column shows whether it is restricted per zone or for the whole region. Pick another zone, a similar size, or another region. If it is a quota error instead, az vm list-usage shows the family and regional vCPU limits, and I request an increase or free cores elsewhere.
Also asked: What does the s in a VM size name such as D2s_v5 mean? · Why do you still pay for a stopped VM? · How would you resize a VM to a size that is not in its resize options?
Learn it: 33.7 Virtual machines: images, sizes, quotas and the first boot
How do you move a VM to another region? Mid
Not with a resource move - az resource move only changes the resource group or subscription, never the region. I would use Azure Resource Mover, or replicate it with Site Recovery and fail over, or rebuild it from a snapshot or image with the same template. Then update DNS, monitoring and anything that used the old resource ID.
Also asked: What is the difference between encryption at host and server-side encryption? · Why would you choose Premium SSD v2 over Premium SSD? · What has to move together with a VM in a resource move?
Learn it: 33.9 VM disks, encryption at host, and moving a VM
How would you make a VM-based service survive a datacenter outage? Mid
Run at least two instances across availability zones, behind a zone-redundant Standard load balancer, with zone-redundant or replicated data. For more than a couple of VMs, a scale set across zones with autoscale, a health probe and rolling upgrades - and a minimum capacity that still serves traffic when one zone is gone.
Also asked: What does an availability set protect against that a single VM does not? · How do scale-in and scale-out rules interact in autoscale? · Why would a scale set scale down to zero?
Learn it: 33.11 Availability sets, zones, scale sets and autoscale
When would you pick Container Apps over AKS? Mid
When the team wants to run containers, not operate Kubernetes: HTTP APIs and workers with scale to zero, revisions and traffic splits built in, and no node pools to upgrade. AKS when we need the Kubernetes API itself - operators, daemonsets, network policies, a shared platform for many teams. Either way the image comes from ACR, pulled with a managed identity that has AcrPull.
Also asked: How does an Azure Container Instance pull from a private registry without a password? · What is a revision in Azure Container Apps? · How would you run a nightly batch job in a container on Azure?
Learn it: 33.14 Containers without a cluster: ACR, Container Instances, Container Apps
Users get a certificate error on our custom domain after a migration. What do you check? Mid
Whether the new app has the hostname bound with a certificate that covers it: az webapp config hostname list shows the SSL state. If it is still serving the azurewebsites.net certificate, create or import the certificate and bind it with SNI. Then HTTPS Only and the minimum TLS version, and that DNS points at the new app.
Also asked: Which App Service tier is the cheapest that supports autoscale and deployment slots? · How do you verify ownership of a custom domain in App Service? · How does an App Service app reach a database in a private VNet?
Learn it: 33.17 App Service: plans, scaling, custom domains, TLS, backups and networking
How do you deploy a web app with zero downtime on App Service? Mid
Deploy to a staging slot, run smoke tests against it, swap with preview so it warms up with the production settings, then complete the swap. Environment-specific settings are slot settings (--slot-settings) so they never move. Rollback is a second swap, because staging now holds the previous release.
Also asked: Which settings stay with a slot during a swap? · How would you test a new release with 10 percent of real users on App Service? · What do you do if a swap moved the wrong connection string to production?
Learn it: 33.21 Deployment slots: release by swapping, roll back by swapping again
Two VNets are peered but VMs cannot talk. Where do you look? Mid
Peering state on both sides - Connected and in sync - then the effective routes on the source NIC for the destination prefix, then effective NSG rules both ways or IP flow verify, then a connectivity check to see whether anything listens. Overlapping address spaces and a UDR sending the prefix to an appliance are the usual surprises.
Also asked: Why is VNet peering not transitive and how do you work around it? · What changes when you add an address range to a peered VNet? · What is the difference between a Basic and a Standard public IP?
Learn it: 33.24 VNet peering, public IPs and troubleshooting connectivity
Service endpoint or private endpoint - how do you choose? Mid
A service endpoint when it is enough to say "this subnet may use this service" and the traffic only comes from that subnet - it is free and needs no DNS changes. A private endpoint when the service must have a private IP, be reachable from peered VNets or on-premises, or have public access switched off entirely - with a private DNS zone so the name resolves to it.
Also asked: How would you find which NSG rule blocks traffic to a VM? · What are application security groups used for? · How do you give admins SSH access to VMs that have no public IP?
Learn it: 33.27 Secure access: NSGs with ASGs, effective rules, Bastion, service and private endpoints
Users time out on a load-balanced service but every VM looks fine. What do you check? Mid
Health probe status per backend: if they are all down, the probe is failing - wrong path or port, a 301 instead of a 200, or an NSG that blocks 168.63.129.16 (the AzureLoadBalancer tag). Then whether the VMs are actually in the backend pool, and whether the frontend port has a rule. DipAvailability shows the probe health over time.
Also asked: How do you delegate a domain to Azure DNS? · How do you point the apex of a domain at an Azure public IP? · What is the difference between a public and an internal load balancer?
During an incident we found the web app's request logs were never collected. How do you stop that happening again? Mid
Diagnostic settings are part of the resource's definition: put them in the template or module, and back that with an Azure Policy that deploys them to the central Log Analytics workspace when they are missing, plus a compliance report. Logs only exist from the moment a setting exists, so it cannot be an incident-time task.
Also asked: What is the difference between platform metrics and resource logs? · How do you collect memory and disk usage from inside an Azure VM? · What does the activity log record and how long is it kept?
Learn it: 33.35 Azure Monitor: metrics, diagnostic settings, log queries and Insights
An alert fired during an incident but nobody was paged. How do you investigate? Mid
Confirm it fired and when, then check alert processing rules on its scope - a suppression left on after maintenance is common - then the action group: the right receivers, nobody unsubscribed, a test notification arrives (az monitor action-group test-notifications create). And I would add a regular synthetic test of the paging path so we find out before the next incident.
Also asked: What is the difference between an alert rule and an action group? · How do you silence alerts during a planned maintenance window? · When would you use a log search alert instead of a metric alert?
Learn it: 33.38 Alerts that page: alert rules, action groups and alert processing rules
How would you know a network path broke before users tell you? Mid
A connection monitor test from the app's VMs to each dependency - the database port, the payment API's URL - writing to Log Analytics, with an alert on failed checks or latency. When it fires, the results show the first failing minute, and the activity log shows what changed then. For a one-off check, IP flow verify and next hop answer which rule or route is responsible.
Also asked: Which Network Watcher tool tells you which NSG rule blocks a connection? · How would you check where a VM's traffic to an IP address is routed? · What is the difference between flow logs and a connection monitor?
Is a certification like AZ-104 worth it? Mid
On its own it shows I know the platform's breadth - identity, storage, compute, networking, monitoring - and the vocabulary. What matters more is that I have done it hands-on: I can show a template I fixed with what-if, an autoscale rule I debugged, an action group I traced when an alert did not page. The exam is the checklist; the incidents are the experience.
Also asked: How did you prepare for your Azure certification? · Which part of Azure administration do you find hardest and why? · How do you keep up with changes to Azure services?
Learn it: 33.44 The AZ-104 exam: format, domains, a study plan and the mocks
Practise these answers with flashcards and labs Free, in your browser - a real Ubuntu terminal to try it in, with missions that check your work.