View Full Microsoft AZ-204 Exam Dumps and Practice Test Dumps
Q201. Which Azure Functions hosting plan is best suited for applications that require virtual network connectivity and pre-warmed instances?
1) Consumption plan
2) Premium plan
3) Dedicated plan only
4) Static Web Apps plan
Correct Answer: 2)
Explanation:
The Azure Functions Premium plan is designed for workloads that require features such as pre-warmed instances, more predictable performance, and virtual network connectivity. Unlike the traditional Consumption plan, Premium provides instances that can remain warm, reducing cold-start delays for applications that require fast responses. It also supports scaling based on demand while providing more control over networking and runtime behavior. This makes it appropriate for enterprise applications that need secure access to resources inside a virtual network. The Dedicated plan can also host Functions, but Premium is specifically designed to combine serverless scaling with enhanced performance and networking capabilities.
Q202. Which feature allows an Azure Function to automatically retry a failed execution according to configured retry policies?
1) Function retry policy
2) Deployment slot
3) Application setting
4) Azure CDN
Correct Answer: 1)
Explanation:
Azure Functions supports retry policies that allow failed function executions to be attempted again automatically. Retry behavior can be configured for supported triggers and bindings, helping applications handle temporary failures such as network interruptions or unavailable dependent services. Depending on the trigger and runtime, retries can be configured using fixed-delay or exponential-backoff approaches. This reduces the need to implement repeated retry logic manually inside application code. Developers should still design functions to be idempotent when retries may cause the same operation to execute more than once. Deployment slots, application settings, and Azure CDN do not directly provide function execution retry behavior.
Q203. A Durable Function activity fails because a temporary external service is unavailable. What should the developer use to retry the activity?
1) Blob lifecycle management
2) Durable activity retry options
3) App Service access restrictions
4) Cosmos DB TTL
Correct Answer: 2)
Explanation:
Durable Functions provides retry options for activity functions so that temporary failures can be handled without requiring developers to manually implement retry loops in the orchestration code. A retry policy can specify settings such as the maximum number of attempts and the delay between attempts. Exponential backoff can also be used when appropriate to gradually increase the delay between retries. This approach is useful when an external service may become temporarily unavailable. Durable Functions manages the orchestration state, allowing the workflow to continue after a successful retry. Blob lifecycle management, access restrictions, and Cosmos DB TTL serve unrelated purposes.
Q204. A Durable Functions orchestration must wait until an external application sends a signal before continuing. Which feature should be used?
1) Durable timer
2) External event
3) Activity trigger
4) Queue output binding
Correct Answer: 2)
Explanation:
Durable Functions external events allow an orchestration to pause and wait for an event raised by another application or process. This is useful for workflows that depend on human approval, external system responses, or business decisions. The orchestration can wait for a named event and resume when the event is received. This provides a reliable way to coordinate long-running processes without keeping a server thread continuously active. A durable timer is appropriate when the workflow needs to wait for a specific time or duration, while an activity function performs work rather than waiting for an external signal.
Q205. Which Durable Functions feature allows an orchestration to invoke another orchestration as part of a larger workflow?
1) Sub-orchestration
2) Function key
3) Deployment slot
4) Blob trigger
Correct Answer: 1)
Explanation:
Durable Functions supports sub-orchestrations, which allow one orchestration to call another orchestration as a logical component of a larger workflow. This is useful when a complex process can be divided into reusable workflows. For example, an order-processing orchestration could invoke separate sub-orchestrations for payment processing, inventory management, and shipping. Sub-orchestrations improve organization, reuse, and maintainability because each workflow can focus on a specific responsibility. Durable Functions manages the state of the orchestration and coordinates its execution. Function keys, deployment slots, and Blob triggers are unrelated to invoking one orchestration from another.
Q206. What is an important consideration when writing Durable Functions orchestrator code?
1) The orchestrator should generate random values during every replay
2) The orchestrator should avoid deterministic operations
3) The orchestrator should use deterministic code
4) The orchestrator should always access external services directly
Correct Answer: 3)
Explanation:
Durable Functions orchestrator code must be deterministic because the Durable Functions runtime can replay orchestration history to reconstruct the current state. Operations that produce different results during replay, such as generating random values directly or reading the current system time improperly, can cause inconsistent behavior. Developers should use Durable Functions APIs designed for deterministic operations and place external interactions inside activity functions. This replay-based model allows Durable Functions to reliably manage long-running workflows. Understanding determinism is therefore essential when developing orchestrators. Direct access to external services, nondeterministic values, and uncontrolled system operations should generally be avoided inside orchestrator functions.
Q207. Which Azure Functions feature provides a centralized location for configuration values such as connection strings and environment-specific settings?
1) Application settings
2) Deployment slot hostname
3) Function timeout
4) HTTP trigger
Correct Answer: 1)
Explanation:
Azure Functions application settings provide a centralized way to store configuration values that an application can access through environment variables. They are useful for connection information, feature configuration, environment-specific values, and other settings that should not be hard-coded into function source code. Application settings can be configured separately for different deployment environments and can be marked as deployment slot settings when using App Service slots. Sensitive values should still be protected appropriately, often by using Azure Key Vault or managed identities. HTTP triggers control how functions are invoked, while timeouts and hostnames serve different purposes.
Q208. A developer wants to register services and dependencies in an Azure Functions application using dependency injection. What should be configured?
1) Dependency injection in the Functions startup/application configuration
2) Azure CDN rules
3) Blob access tier
4) Cosmos DB TTL
Correct Answer: 1)
Explanation:
Dependency injection allows Azure Functions applications to register services and provide them to function classes or components through their constructors or supported dependency mechanisms. This improves testability, maintainability, and separation of responsibilities because functions do not need to manually create every dependency. Developers can register services such as database clients, application services, or configuration-related components and then consume them where required. The exact implementation depends on the Functions runtime and programming model being used. Azure CDN rules, Blob access tiers, and Cosmos DB TTL address storage or content-delivery requirements and do not provide dependency injection functionality.
Q209. Which App Service feature provides built-in authentication and authorization without requiring developers to implement all authentication logic in application code?
1) App Service authentication
2) Deployment slot swap
3) Autoscale
4) Health Check
Correct Answer: 1)
Explanation:
Azure App Service authentication, often called Easy Auth, provides built-in authentication and authorization capabilities for web applications and APIs. It can integrate with identity providers and manage authentication flows without requiring developers to implement every authentication component directly in application code. This can simplify securing applications and controlling access to resources. The application can receive authenticated user information through the platform-supported authentication mechanism. Deployment slots are used for application deployment strategies, autoscale manages capacity, and Health Check monitors application availability. Therefore, App Service authentication is the appropriate feature when the primary requirement is platform-managed user authentication and authorization.
Q210. An App Service application should only accept traffic from approved IP addresses. Which feature should be configured?
1) Deployment slots
2) Access restrictions
3) Application Insights
4) Autoscale rules
Correct Answer: 2)
Explanation:
App Service access restrictions allow developers to control inbound traffic based on conditions such as IP addresses, virtual network configurations, and other supported rules. This is useful when an application should only be accessible from trusted networks or approved sources. Rules can allow or deny traffic according to defined priorities. Access restrictions provide an application-level network access control mechanism without requiring the application itself to inspect every incoming request. Deployment slots manage versions, Application Insights provides monitoring and telemetry, and autoscale rules control application capacity. Therefore, access restrictions are the appropriate choice when the requirement is to limit inbound traffic to approved sources.
Q211. Which App Service capability is used to secure a custom domain with an HTTPS certificate?
1) SSL/TLS certificate binding
2) Autoscale
3) Health Check
4) Deployment slot routing
Correct Answer: 1)
Explanation:
App Service supports HTTPS for custom domains by using SSL/TLS certificates and bindings. A certificate can be associated with a custom domain so that clients establish encrypted connections when accessing the application. HTTPS protects data exchanged between clients and the application and is especially important for authentication credentials, personal information, and API traffic. App Service provides several certificate management options depending on the deployment requirements. Autoscale is concerned with capacity, Health Check monitors application availability, and slot routing controls traffic between deployment slots. Therefore, SSL/TLS certificate binding is the feature directly associated with securing a custom domain using HTTPS.
Q212. An App Service application needs to automatically add instances when CPU usage remains high. Which feature should be configured?
1) Application Insights
2) App Service autoscale
3) Deployment slot settings
4) Custom domain binding
Correct Answer: 2)
Explanation:
App Service autoscale can automatically adjust the number of application instances based on defined scaling conditions. Developers can configure rules using metrics such as CPU utilization, memory usage, request counts, or other supported measurements. When the configured conditions are met, App Service can add or remove instances to respond to workload changes. This helps applications maintain performance during periods of increased demand while reducing unnecessary resource usage when demand decreases. Application Insights is primarily used for application monitoring and telemetry, while slot settings and custom domain bindings serve configuration and routing purposes. Autoscale is therefore the correct feature for automatically adjusting application capacity.
Q213. Which App Service feature can be used to create backups of an application and its supported data?
1) App Service backup
2) Access restrictions
3) Front Door routing
4) Health Check
Correct Answer: 1)
Explanation:
App Service backup provides a mechanism for creating backups of supported application content and configuration. Depending on the configuration, backups can include application files, settings, and supported database content. Backups can be useful for recovery scenarios and for maintaining restore points before significant application changes. Developers should configure an appropriate storage destination and understand the supported backup requirements and limitations. Access restrictions control inbound traffic, Front Door provides global routing and application delivery, and Health Check monitors application availability. Therefore, when the requirement is to create recoverable copies of an App Service application, the built-in App Service backup capability is the appropriate choice.
Q214. An App Service application must be accessible privately through an Azure virtual network rather than through a public endpoint. Which feature should be used?
1) Azure CDN
2) Private Endpoint
3) Application Insights
4) Deployment slot
Correct Answer: 2)
Explanation:
An App Service Private Endpoint provides private connectivity to an App Service through an Azure virtual network by assigning the service a private IP address within the network. This allows applications and services that can access the virtual network to communicate with the App Service without relying on its public endpoint for inbound access. Private connectivity is useful for workloads with strict network isolation requirements. Application Insights is a monitoring service, Azure CDN distributes cached content globally, and deployment slots support application version management. Therefore, Private Endpoint is the appropriate feature when an App Service must be reached privately through an Azure virtual network.
Q215. A company operates an Azure Container Registry and wants container images to be available from multiple Azure regions. Which feature should be used?
1) ACR Tasks
2) ACR geo-replication
3) Kubernetes ConfigMap
4) Container restart policy
Correct Answer: 2)
Explanation:
Azure Container Registry geo-replication allows an Azure Container Registry to replicate container images and other supported registry content across multiple Azure regions. This can improve image-pull performance for geographically distributed workloads and provide greater resilience if access to one region is affected. When applications running in different regions need container images, pulling them from a nearby replicated registry can reduce network latency. ACR Tasks automate container image build and management workflows, but they do not primarily provide multi-region registry replication. Kubernetes ConfigMaps store configuration data, while restart policies control container behavior. Geo-replication is therefore the correct feature for distributing registry content across regions.
Q216. Which Azure Container Registry feature can automatically build and push a container image when source code changes are detected?
1) ACR Tasks
2) Azure Front Door
3) Azure Queue Storage
4) App Service Health Check
Correct Answer: 1)
Explanation:
ACR Tasks provide automated container image build and management capabilities within Azure Container Registry. Developers can configure tasks to build images when source code changes, when base images are updated, or according to scheduled triggers. This can simplify container CI/CD workflows by moving image-building operations into the registry environment. ACR Tasks can also automate tagging and pushing images after successful builds. Azure Front Door handles global application delivery, Queue Storage provides messaging, and Health Check monitors App Service availability. Therefore, ACR Tasks are the appropriate choice when a developer needs container images to be automatically built and pushed in response to source changes.
Q217. Which Kubernetes Service type exposes an application internally within the cluster using a stable virtual IP?
1) LoadBalancer
2) NodePort
3) ClusterIP
4) ExternalName
Correct Answer: 3)
Explanation:
The Kubernetes ClusterIP Service type exposes an application internally within the Kubernetes cluster and provides a stable virtual IP address for accessing the selected Pods. It is commonly used when one application component needs to communicate with another without exposing the service directly to external clients. A LoadBalancer Service is designed to expose an application externally through a cloud load balancer, while NodePort exposes a service through a port on each node. ExternalName maps a service to an external DNS name. Therefore, ClusterIP is the appropriate Service type when internal cluster communication is required.
Q218. Which Kubernetes object should be used to store non-sensitive configuration values separately from container images?
1) Secret
2) ConfigMap
3) Deployment
4) PersistentVolume
Correct Answer: 2)
Explanation:
A Kubernetes ConfigMap stores non-sensitive configuration data separately from application container images. Applications can consume ConfigMap values as environment variables, command-line arguments, or mounted files. This allows the same container image to be reused across different environments while configuration values are supplied externally. Sensitive information such as passwords, tokens, and certificates should instead be stored using Kubernetes Secrets or an appropriate external secret-management service. Deployments define how Pods are managed and updated, while PersistentVolumes provide persistent storage. Therefore, ConfigMap is the correct Kubernetes object for separating ordinary configuration data from the application image.
**Q219. What is the primary purpose of a Kubernetes Pod Disruption Budget?
1) Limit container image size
2) Control the minimum availability of Pods during voluntary disruptions
3) Store application passwords
4) Assign DNS names to services
Correct Answer: 2)
Explanation:
A Kubernetes Pod Disruption Budget, or PDB, helps maintain application availability during voluntary disruptions such as node maintenance or cluster operations. It specifies limits on how many Pods from a workload can be voluntarily disrupted at the same time, often by defining a minimum number of available Pods or a maximum number of unavailable Pods. A PDB does not prevent every possible failure, particularly unexpected hardware failures, but it helps protect workloads during planned operations. Image size management, secret storage, and DNS naming are unrelated responsibilities. Therefore, the primary purpose of a PDB is to help maintain the required level of Pod availability during voluntary disruptions.
Q220. An AKS application requires persistent storage that can survive Pod recreation. Which Azure storage option is commonly used for persistent Kubernetes volumes?
1) Azure Disk or Azure Files
2) Azure CDN
3) Azure Event Grid
4) Azure Application Insights
Correct Answer: 1)
Explanation:
Azure Disk and Azure Files can provide persistent storage for applications running in Azure Kubernetes Service. Persistent volumes allow application data to remain available even when individual Pods are deleted, recreated, or rescheduled. Azure Disk is commonly used for storage that is attached to a workload requiring disk-based persistence, while Azure Files can provide shared file storage that multiple Pods can access when supported by the workload and configuration. Azure CDN is used for content delivery, Event Grid handles event routing, and Application Insights provides application monitoring. Therefore, Azure Disk or Azure Files is the appropriate choice for persistent Kubernetes storage.