Tüm alıştırma soruları

972 soru

Soru 121Soru

An organization is migrating an existing Azure Function App (V4 runtime) to meet security compliance guidelines that forbid storing connection strings in application settings. You must configure the Function App to use an identity-based connection for its default host storage account (AzureWebJobsStorageAzureWebJobsStorage) using a system-assigned managed identity.

Which of the following actions must you perform? (Select TWO)

Geçerli olan tümünü seçin

Cevabı ve açıklamayı göster

Cevap: Add an application setting named AzureWebJobsStorage__accountName and set its value to the name of the storage account.; Assign the Storage Blob Data Owner, Storage Queue Data Contributor, and Storage Table Data Contributor roles to the system-assigned managed identity on the storage account.

Cevap

To configure the Function App to use an identity-based connection for AzureWebJobsStorageAzureWebJobsStorage, you must add the application setting AzureWebJobsStorage__accountName with the storage account name as its value, and assign the Storage Blob Data Owner, Storage Queue Data Contributor, and Storage Table Data Contributor roles to the system-assigned managed identity on the storage account.
The correct options are the actions to add the AzureWebJobsStorage__accountName application setting and to assign the Storage Blob Data Owner, Storage Queue Data Contributor, and Storage Table Data Contributor roles to the system-assigned managed identity. The AzureWebJobsStorage__accountName setting signals to the Azure Functions runtime that it should connect to the storage account using the managed identity. The specific RBAC roles are required because the Azure Functions host runtime needs blob owner privileges for lease management, and queue/table permissions for host execution and key management.

Adım Adım Çözüm

1
Enable system-assigned managed identity on the Function App.
The Function App is registered with Microsoft Entra ID and has an identity principal created.
An identity is required to authorize the Function App to access the storage account without connection strings.
2
Configure the Azure WebJobs host storage application setting.
Replace the connection string-based setting with AzureWebJobsStorage__accountName.
This setting instructs the V4 Functions runtime to connect to the designated storage account using the managed identity.
3
Assign the necessary RBAC roles to the Function App's identity on the storage account.
The identity is granted Storage Blob Data Owner, Storage Queue Data Contributor, and Storage Table Data Contributor roles.
The Functions host requires Blob Owner permissions for managing blob container leases, and Queue/Table contributor roles for managing tasks and function keys.

Anahtar Kavram

Configuring identity-based connections for Azure Functions host storage
Soru 122Soru

You are configuring deployment slots for an Azure App Service web app named app-payment-service. The application requires specific configurations in the staging slot to run integration tests before being swapped into the production slot. You need to identify which configuration settings will be transferred to the production slot and which will remain slot-specific during the swap operation. Which two of the following settings are swapped by default when you perform a slot swap?

Geçerli olan tümünü seçin

Cevabı ve açıklamayı göster

Cevap: General settings, such as framework version and platform architecture (32-bit/64-bit); Handler mappings and virtual directory mappings

Cevap

The settings that are swapped by default during an App Service slot swap are general settings (such as framework version and platform architecture) and handler/virtual directory mappings.
General settings (such as framework version and platform architecture) as well as handler and virtual directory mappings are part of the application configuration and are swapped by default during an App Service slot swap. This ensures that the newly promoted production app runs with the exact same application environment and mappings verified in the staging slot.

Adım Adım Çözüm

1
Analyze which settings are swapped versus which settings are sticky to a slot during an Azure App Service slot swap.
Identify that general settings (framework version, 32-bit/64-bit) and handler/virtual directory mappings are swapped, while managed identities and autoscale configurations are slot-specific (sticky).
This separation ensures that runtime configurations and code-level handlers migrate with the application, while resource identities and environment scale rules remain bound to their respective slots.

Anahtar Kavram

Azure App Service slot swap configuration settings behavior (swapped vs. sticky settings)
Tahmini Süre:1m 30s
Soru 123Soru

An organization is designing an Azure Cosmos DB container to store employee profile documents. The system must support high-volume write operations and maintain efficient query performance.

Which two statements describe correct characteristics of Azure Cosmos DB partitioning that must be considered?

Geçerli olan tümünü seçin

Cevabı ve açıklamayı göster

Cevap: Selecting a property with high cardinality, such as employee ID, distributes throughput and storage consumption evenly across physical partitions.; The partition key is defined when the container is created and cannot be updated for that container afterward.

Cevap

Selecting a property with high cardinality distributes throughput and storage evenly, and the partition key cannot be updated for a container after creation.
Selecting a property with high cardinality, such as employee ID, allows Cosmos DB to scale horizontally by distributing the write and read workloads across many partitions. Additionally, the partition key of a container is immutable once created, which is a critical design constraint that requires careful initial planning.

Adım Adım Çözüm

1
Evaluate the impact of property cardinality on partition keys.
High cardinality keys distribute data and throughput workload across physical partitions, whereas low cardinality keys lead to hot partitions.
Choosing a unique field ensures that write workloads are spread across many logical and physical partitions, avoiding bottlenecking.
2
Analyze the mutability and lifecycle of partition keys in Azure Cosmos DB.
Partition keys are immutable once a container is created and cannot be updated in place for existing documents.
Because the partition key determines physical distribution logic, changing a container's partition key requires a complete data migration to a new container.

Anahtar Kavram

Azure Cosmos DB partitioning strategies, partition key immutability, and cardinality considerations.
Tahmini Süre:1m 0s
Soru 124Soru

You are deploying a containerized application to Azure Container Apps. The container image is hosted in a private Azure Container Registry (ACR) named myregistry.azurecr.io. You have created a user-assigned managed identity named identity-aca in the resource group rg-prod, and the identity has already been granted the AcrPull role on the registry. You need to configure an existing Container App named api-service in the same resource group to use this user-assigned managed identity to authenticate and pull the image from the registry. Which two of the following Azure CLI commands should you run to complete the configuration? (Select TWO.)

Geçerli olan tümünü seçin

Cevabı ve açıklamayı göster

Cevap: az containerapp identity assign -n api-service -g rg-prod --user-assigned "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg-prod/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-aca"; az containerapp registry set -n api-service -g rg-prod --server myregistry.azurecr.io --identity "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg-prod/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-aca"

Cevap

To configure the Container App to pull images from the private registry using the user-assigned identity, you must first assign the user-assigned identity using the 'az containerapp identity assign' command with the '--user-assigned' parameter. Afterward, you must configure the registry settings using 'az containerapp registry set' with the '--identity' parameter specifying the user-assigned identity's resource ID.
Configuring registry access via a user-assigned managed identity requires two CLI steps: assigning the identity's resource ID to the Container App using the 'az containerapp identity assign' command, and setting the registry authentication behavior using 'az containerapp registry set' with the '--identity' parameter specifying the identity's resource ID.

Adım Adım Çözüm

1
Assign the user-assigned managed identity to the Container App.
The identity is linked to the Container App resource.
The Container App must possess the identity before it can be referenced in registry configuration.
2
Configure the Container App registry settings with the identity.
The Container App registry configuration is updated.
This links the registry server authentication mechanism to the assigned user-assigned managed identity.

Anahtar Kavram

Configuring Azure Container App registry authentication using user-assigned managed identities.
Soru 125Soru

You are developing a secure containerized application that will run in Azure Container Instances (ACI). The container needs to read a database connection string from an Azure Key Vault at startup. To follow security best practices, the container group must authenticate to the Key Vault without storing any credentials in the deployment template or container image. Additionally, the identity's lifecycle must be tied directly to the lifecycle of the container group, meaning the identity is automatically deleted when the container group is deleted. Which identity configuration should you apply to the container group?

Cevabı ve açıklamayı göster

Cevap: A system-assigned managed identity enabled on the container group

Cevap

A system-assigned managed identity enabled on the container group
The correct option is the system-assigned managed identity. A system-assigned managed identity is created directly on the Azure Container Instances (ACI) container group. It is tied to the lifecycle of that specific container group, meaning it is automatically created when the container group is provisioned and automatically deleted when the container group is deleted.

Adım Adım Çözüm

1
Analyze the authentication requirement.
The requirement mandates that the container group authenticates to Azure Key Vault securely without hardcoded credentials.
Managed identities for Azure resources allow authentication to Azure services without embedding secrets in the code or configuration.
2
Evaluate the lifecycle constraint.
The identity's lifecycle must match the container group's lifecycle.
A system-assigned managed identity is tied directly to the resource instance. When the container group is deleted, Azure automatically cleans up the identity.
3
Select the correct identity type.
Select a system-assigned managed identity enabled on the container group.
This configuration satisfies both the credential-free authentication and the lifecycle coupling requirements.

Anahtar Kavram

Azure Container Instances supports managed identities for authenticating to other Microsoft Entra-protected resources such as Azure Key Vault. A system-assigned managed identity is tied to the lifecycle of the resource.
Soru 126Soru

You are designing an Azure Cosmos DB container for a smart home energy monitoring platform that receives real-time telemetry from 50,00050,000 active devices. The workload has the following characteristics:

* Write profile: High-volume write ingestion of hourly usage metrics (10,00010,000 writes/sec).
* Read profile: Frequent read queries searching for telemetry by device ID and a specific date range.
* Transactional boundary: The platform must run ACID transactions using transactional batches to calculate and update daily summary aggregates for a device on a specific day.
* Storage profile: Individual devices generate a high volume of data that must be retained indefinitely.

You need to configure the partitioning strategy to support the transactional requirements, avoid the hot partition problem, and prevent logical partitions from exceeding the 20 GB20\text{ GB} limit.

Which two strategies should you implement?

Geçerli olan tümünü seçin

Cevabı ve açıklamayı göster

Cevap: Create a synthetic partition key by concatenating the device ID and the date (such as `deviceId_date`) for each telemetry record.; Execute the transactional batches with the partition key value set to the concatenated device ID and date of the target day.

Cevap

Create a synthetic partition key by concatenating the device ID and the date (such as `deviceId_date`) and execute the transactional batches with the partition key value set to the concatenated device ID and date of the target day.
To support transactional batches, all documents in the transaction must share the same partition key value because transactions in Azure Cosmos DB are scoped to a single logical partition. Concatenating the device ID and the date (e.g., `deviceId_date`) forms a synthetic partition key that ensures all telemetry records for a specific device on a given day reside in the same logical partition, allowing transactional batches to succeed. Additionally, this synthetic key prevents logical partitions from exceeding the 20 GB20\text{ GB} limit over time by scoping the partition to a single day per device, and it distributes the write throughput (10,00010,000 writes/second) evenly across a high cardinality of partitions (different devices).

Adım Adım Çözüm

1
Analyze the transactional boundary and logical partition size limits.
Identify that transactions must be scoped to a single logical partition and that a single device's historical data will exceed the 20 GB20\text{ GB} limit over time if partitioned by device ID alone.
This establishes the need to partition by a combination of device and time to restrict partition growth.
2
Evaluate write throughput distribution to avoid hot partitions.
Determine that partitioning by date alone concentrates all 10,00010,000 writes/sec on one logical partition, leading to rate-limiting.
This rules out simple date-based partitioning due to throughput hotspots.
3
Design a synthetic partition key that satisfies both transaction boundaries and scaling.
Combine the device ID and date to form a synthetic key, and ensure transactional batches target this specific partition key value.
This keeps partitions small, distributes writes evenly, and permits transactional batches for the device-day aggregation.

Anahtar Kavram

Selecting a partition key that balances transactional scope, limits partition growth, and distributes throughput to prevent hot partitions.
Soru 127Soru

You are designing a financial reconciliation pipeline using Azure Durable Functions in C#. The workflow is triggered hourly to audit transactions. A critical activity function in the pipeline performs a complex ledger analysis that takes up to 25 minutes to execute. Additionally, the orchestrator function must generate a unique tracking identifier for each transaction and write a custom log entry to Azure Application Insights at the start of each execution.

You need to select the appropriate hosting plan and ensure the orchestrator function complies with the Durable Functions execution constraints.

Which two actions should you perform? (Select two.)

Geçerli olan tümünü seçin

Cevabı ve açıklamayı göster

Cevap: Deploy the function app to an Azure Functions Premium plan.; Generate the tracking identifier in the orchestrator function by calling context.NewGuid().

Cevap

Deploy the function app to an Azure Functions Premium plan, and generate the tracking identifier in the orchestrator function by calling context.NewGuid().
Deploying to the Premium plan allows the activity function to execute beyond the 10-minute limitation of the Consumption plan, supporting execution durations up to 30 minutes (or unbounded depending on configuration). Generating the tracking identifier with context.NewGuid() ensures that the ID remains stable during orchestrator replays, satisfying the requirement for orchestrator determinism.

Adım Adım Çözüm

1
Determine the hosting plan based on execution limits.
Identify that the Premium plan or Dedicated plan is required because the ledger analysis activity function takes 25 minutes, exceeding the Consumption plan's 10-minute limit.
The Consumption plan enforces a strict maximum execution timeout of 10 minutes per invocation.
2
Evaluate the requirement for unique tracking identifiers inside the orchestrator function.
Select context.NewGuid() over System.Guid.NewGuid() to maintain determinism.
Orchestrator functions must be deterministic, meaning they must produce the same outputs given the same inputs. Standard GUID generation is non-deterministic and violates replay safety.
3
Evaluate the logging options.
Reject the standard ILogger call because it writes duplicate logs during replays.
Standard logging causes duplicate telemetry on replays. Instead, context.CreateReplaySafeLogger(logger) must be used to filter out log statements during replays.

Anahtar Kavram

Orchestrator determinism and hosting plan limitations in Azure Durable Functions
Soru 128Soru

You are developing a new event-driven Azure Function that will process messages from an Azure Queue Storage queue. The message traffic is highly irregular with long periods of inactivity. To minimize costs, you require a hosting plan that scales to zero instances when idle and charges you only for the resources consumed during execution.

Which hosting plan should you select?

Cevabı ve açıklamayı göster

Cevap: Consumption plan

Cevap

Consumption plan
The Consumption plan is the correct choice because it automatically scales instances based on demand, scales down to zero when there is no traffic, and bills only for active executions.

Adım Adım Çözüm

1
Analyze the requirements for scaling and billing.
The requirement specifies scaling to zero instances when idle and a pay-per-use cost model (billed only during execution).
Understanding the core constraints helps filter out plans with pre-warmed instances or flat-rate VM pricing.
2
Evaluate the Consumption plan features.
The Consumption plan scales out automatically, scales down to zero instances when idle, and charges only based on execution count and resource consumption.
This matches all criteria in the scenario.
3
Evaluate the alternative hosting plans.
The Premium plan requires at least one pre-warmed instance, and both Dedicated and Basic App Service plans charge continuous VM fees, so none of these scale to zero and offer pure consumption billing.
Eliminating options that do not scale to zero confirms the correct selection.

Anahtar Kavram

Selecting the appropriate Azure Functions hosting plan based on scaling requirements and billing models.
Tahmini Süre:45s
Soru 129Soru

You are deploying a web application to an Azure App Service web app named app-inventory. The application must retrieve a database connection string from an Azure Key Vault named kv-prod.

You have the following requirements:
- Authenticate to the Key Vault using a user-assigned managed identity named id-inventory.
- Configure the application settings of the web app to retrieve the credential using a Key Vault reference.
- Ensure the configuration automatically retrieves the latest version of the secret.

Which two actions must you perform to configure the web app? (Choose two.)

Geçerli olan tümünü seçin

Cevabı ve açıklamayı göster

Cevap: Grant the id-inventory user-assigned managed identity a Key Vault access policy with Secret Get permissions on kv-prod.; Set the keyVaultReferenceIdentity configuration property of the web app to the resource ID of the id-inventory managed identity.

Cevap

Grant the user-assigned managed identity the required Secret Get permissions on the Key Vault, and set the keyVaultReferenceIdentity configuration property of the web app to the resource ID of that user-assigned managed identity.
To retrieve Key Vault secrets using a user-assigned managed identity in Azure App Service Key Vault references, you must perform two main steps. First, the user-assigned managed identity must have permissions to read secrets from the Key Vault (accomplished by granting it Secret Get permissions or the Key Vault Secrets User role). Second, because App Service defaults to the system-assigned identity, you must configure the web app's keyVaultReferenceIdentity property to use the resource ID of the user-assigned managed identity.

Adım Adım Çözüm

1
Configure the Key Vault access policy or Azure RBAC role assignment.
The user-assigned managed identity id-inventory is granted Secret Get permissions on kv-prod.
This allows the managed identity to read the secret value from the Key Vault.
2
Associate the user-assigned managed identity with the App Service web app and set the reference identity.
The web app is configured to use id-inventory for Key Vault references by setting keyVaultReferenceIdentity to the identity's resource ID.
By default, Key Vault references use the system-assigned identity. Specifying keyVaultReferenceIdentity is required to route Key Vault reference retrieval through the user-assigned identity.
3
Create the app setting referencing the Key Vault secret.
The application setting is configured with the correct Key Vault reference syntax.
This enables App Service to resolve the environment variable to the Key Vault secret value at runtime.

Anahtar Kavram

Configuring Key Vault references in Azure App Service with user-assigned managed identities.
Soru 130Soru

You are designing a new Azure Function App (V4 runtime) to process messages from an Azure Service Bus queue. The function app must meet the following requirements:
- Connect to the queue using outbound virtual network integration.
- Support individual execution times that can last up to 25 minutes.
- Minimize cold starts by maintaining at least one pre-warmed instance at all times.
- Scale dynamically based on the queue length without manual scaling rule configuration.

Which hosting plan should you select for the Azure Function App?

Cevabı ve açıklamayı göster

Cevap: Elastic Premium plan

Cevap

Elastic Premium plan
The Elastic Premium plan is the correct choice because it natively supports virtual network integration, has a default execution timeout of 30 minutes (which can be configured to run indefinitely), provides pre-warmed instances to eliminate cold starts, and utilizes the Azure Functions scale controller to dynamically scale instances based on Service Bus queue length.

Adım Adım Çözüm

1
Analyze virtual network requirements
Outbound VNet integration is required, which eliminates the Consumption plan.
The Consumption plan does not support outbound virtual network integration.
2
Analyze execution duration requirements
The function execution can last up to 25 minutes, which eliminates the Consumption plan (limit is 10 minutes) but is supported by Premium and Dedicated plans.
Premium and Dedicated plans support unbounded execution timeouts, whereas the Consumption plan enforces a hard limit of 10 minutes.
3
Analyze cold start and dynamic scaling requirements
Pre-warmed instances are required to minimize cold starts, and the app must scale dynamically based on event rate (queue length). This points to the Elastic Premium plan.
The Elastic Premium plan offers pre-warmed instances and dynamic serverless scaling, whereas Dedicated (App Service) plans scale based on metric-based autoscale rules rather than the Scale Controller monitoring the queue.

Anahtar Kavram

Azure Functions hosting plan comparison, including execution limits, networking features, and scaling behaviors.
Tahmini Süre:2m 0s
Soru 131Soru

A logistics tracking solution uses an Azure App Service Web App to process real-time GPS telemetry. The web app is currently hosted on the Free (F1) pricing tier. During morning dispatch hours, telemetry processing causes the memory usage to spike up to 85%, resulting in out-of-memory errors. You must configure the App Service plan and autoscale rules to dynamically scale out the web app when the Memory Percentage metric exceeds 80% for 10 minutes, while minimizing costs and preventing autoscale flapping.

Which two actions should you perform? (Select TWO)

Geçerli olan tümünü seçin

Cevabı ve açıklamayı göster

Cevap: Scale up the App Service plan to the Standard (S1) pricing tier.; Configure the scale-in rule to trigger when the Memory Percentage is less than 35%.

Cevap

To configure the scaling correctly, you must scale up the App Service plan to the Standard (S1) pricing tier and configure the scale-in rule to trigger when the Memory Percentage is less than 35%.
Scaling up to the Standard (S1) tier is required because it is the lowest-cost tier that supports autoscale rules. Setting the scale-in threshold to 35% prevents flapping because scaling out from 1 to 2 instances at 80% load reduces the average load per instance to 40%. A scale-in threshold of 35% is lower than this post-scale-out value, ensuring the system remains scaled out until the overall demand decreases.

Adım Adım Çözüm

1
Determine the minimum App Service pricing tier that supports metric-based autoscale rules.
The Standard (S1) tier is identified as the most cost-effective tier supporting autoscale. The Free (F1) tier has no scaling, and the Basic (B1) tier only supports manual scaling.
This establishes the target pricing tier required to implement dynamic scaling rules.
2
Calculate the post-scale-out metric value to determine the flapping boundary.
Scaling out from 1 instance to 2 instances at 80% memory usage distributes the load, dropping the average memory percentage to approximately 40% (80%÷2=40%80\% \div 2 = 40\%) across the instances.
This calculation is necessary to determine the threshold below which the scale-in rule must be set to prevent immediate scale-back.
3
Evaluate the scale-in thresholds against the calculated post-scale-out load.
A threshold of 65% is higher than the post-scale-out load of 40%, which would trigger an immediate scale-in (flapping). A threshold of 35% is safely below 40%, preventing the scale-in until load drops further.
Selecting the correct threshold ensures stable scaling behavior under peak loads.

Anahtar Kavram

Configuring autoscale rules and selecting the appropriate pricing tier for Azure App Service to prevent flapping.
Soru 132Soru

You are deploying a containerized application to Azure Container Apps. The container image is hosted in a private Azure Container Registry (ACR). Which two methods can you use to configure the Container App to authenticate and pull the image from the private registry? (Select two.)

Geçerli olan tümünü seçin

Cevabı ve açıklamayı göster

Cevap: Enable a Managed Identity on the Container App and assign it the AcrPull role on the Azure Container Registry.; Enable the admin user account on the Azure Container Registry and configure the registry credentials directly in the Container App settings.

Cevap

Enable a Managed Identity on the Container App and assign it the AcrPull role, or enable the admin user account on the Azure Container Registry and configure the credentials in the Container App.
To pull images from a private Azure Container Registry, Azure Container Apps supports either enabling a managed identity on the Container App with the AcrPull role, or using registry credentials (admin user credentials) stored as secrets in the Container App.

Adım Adım Çözüm

1
Identify that Azure Container Apps must authenticate to the private registry before container creation.
The platform needs credentials or an identity to pull the image.
Since the registry is private, public anonymous pulls are not permitted.
2
Evaluate the managed identity authentication method.
Assigning a managed identity to the Container App with the AcrPull role is a supported secure method.
Managed identities provide a passwordless way to authenticate Azure resources.
3
Evaluate the registry credentials method.
Using the ACR admin username and password configured in the Container App registry settings is a supported fallback method.
Standard username/password authentication is supported by configuring registry secrets in the Container App.

Anahtar Kavram

Azure Container Apps private registry authentication methods
Soru 133Soru

A developer needs to configure an Azure Container Registry (ACR) named `registry204` to notify an external service via a webhook whenever a new container image tag is pushed. The developer must also verify that the webhook is successfully triggered by a push event. Which sequence of steps should the developer perform?

Öğeleri doğru sıraya koymak için sürükleyin

Cevabı ve açıklamayı göster

Cevap

First, verify that the Azure Container Registry is using either the Standard or Premium service tier and obtain the target webhook URL. Next, create the webhook with the `az acr webhook create` command, configuring it to trigger on the `push` action. Then, perform a `docker push` to upload a container image to the registry, triggering the webhook. Finally, run the `az acr webhook list-events` command to verify successful delivery of the webhook notification.
The correct order begins with verifying that the registry is Standard or Premium tier (as Basic does not support webhooks) and obtaining the target URL. Next, the webhook must be created using the `az acr webhook create` command. After the webhook is created, a container image is pushed to trigger the webhook. Finally, the event delivery is verified by running the `az acr webhook list-events` command.

Adım Adım Çözüm

1
Verify the ACR service tier and obtain the webhook destination URL.
The registry is verified to be on a supported tier (Standard or Premium) and the target URL is ready.
ACR webhooks are only available in the Standard and Premium service tiers; they are not supported in the Basic tier.
2
Register the webhook in ACR using the Azure CLI.
A webhook is created in the registry configured to trigger on the `push` action.
The webhook must exist in the registry prior to the push event to capture and forward the trigger.
3
Push a container image to the registry.
The container image is uploaded, triggering the webhook.
Uploading the image triggers the webhook since it was configured to monitor the `push` action.
4
Verify webhook delivery using the CLI.
Webhook invocation logs and status codes are displayed.
The `az acr webhook list-events` command provides the delivery history and response codes from the target API.

Anahtar Kavram

Configuring and verifying webhooks in Azure Container Registry (ACR) to respond to image push events.
Soru 134Soru

A startup hosts a promotional website on an Azure App Service Web App that is currently running on the Shared (D1D1) pricing tier. The company expects a temporary increase in web traffic during an upcoming product launch and wants to scale out the application to multiple instances to distribute the load. What must you do first to enable scaling out for this App Service Web App?

Cevabı ve açıklamayı göster

Cevap: Scale up the App Service plan to a pricing tier that supports scale-out, such as Basic or Standard.

Cevap

Scale up the App Service plan to a pricing tier that supports scale-out, such as Basic or Standard.
Scaling up the App Service plan to a tier like Basic or Standard is the correct first step. The Shared (D1D1) tier runs on shared virtual machines and does not support horizontal scaling (scaling out) to multiple instances. To increase the instance capacity, the hosting plan must first be scaled up to at least the Basic tier (which supports manual scale-out up to 33 instances) or Standard/Premium tiers (which support automated and larger scale-out options).

Adım Adım Çözüm

1
Analyze the current App Service pricing tier and target scaling requirement.
The current plan is on the Shared (D1D1) tier, and the requirement is to scale out (increase the number of VM instances).
Different Azure App Service pricing tiers support different scaling capabilities.
2
Determine scaling limitations of the Shared tier.
The Free and Shared tiers run on shared infrastructure and do not support horizontal scaling (scaling out). Only scaling up (changing to a higher tier) is allowed.
Azure enforces pricing tier constraints where scale-out capabilities start from the Basic tier (for manual scale) and Standard tier (for autoscale).
3
Select the correct action to enable scale-out capabilities.
You must first scale up the plan to at least the Basic tier (for manual scale-out) or Standard tier (for autoscale).
Scaling up unlocks the scale-out features required to handle the traffic spike across multiple instances.

Anahtar Kavram

Azure App Service scaling constraints, specifically that Free and Shared tiers do not support scaling out (horizontal scaling) and require scaling up to at least the Basic tier to enable multiple instances.
Soru 135Soru

An organization deploys a globally distributed web application using Azure Cosmos DB. The application has a requirement that when a manager updates a system setting in client session AA, all other administrators using client session BB in other regions must immediately see the updated setting. The developer does not want to pass or share session tokens between these separate client sessions. Which consistency level should be selected to meet this requirement?

Cevabı ve açıklamayı göster

Cevap: Strong

Cevap

Strong consistency must be selected to guarantee that all client sessions immediately read the latest writes without needing to share session tokens.
Strong consistency offers a linearizability guarantee, ensuring that reads are guaranteed to return the most recent committed version of an item. This satisfies the requirement of immediate update visibility across different client sessions without token sharing.

Adım Adım Çözüm

1
Analyze the consistency requirement.
The application requires that updates made in one client session (AA) must be immediately visible to other client sessions (BB).
This establishes a cross-session global read-after-write consistency requirement.
2
Check constraints on session tokens.
The requirement specifies that the developer does not want to share or manage session tokens.
This rules out using Session consistency with token propagation.
3
Identify the consistency level that guarantees immediate visibility globally.
Strong consistency is the only level that guarantees that any read operation always returns the most recent committed write globally.
Selecting Strong consistency ensures the updates are synchronously replicated and committed across all replica sets before the write is acknowledged.

Anahtar Kavram

Azure Cosmos DB Consistency Levels
Tahmini Süre:1m 0s
Soru 136Soru

You are designing an Azure Function App to process background jobs. The system has the following constraints:

- A single execution of the function can take up to 25 minutes to complete.
- The function must securely connect to an Azure SQL Database located inside a private Azure Virtual Network (VNet).
- The Function App must scale out dynamically to handle unpredictable spikes in traffic.
- You must avoid cold start latency when new messages arrive while minimizing costs during low-traffic periods.

Which hosting plan should you choose for the Function App?

Cevabı ve açıklamayı göster

Cevap: Premium plan

Cevap

Premium plan
The Premium plan is the correct choice because it natively supports regional outbound Virtual Network (VNet) integration, allows function execution limits of up to 60 minutes (or unlimited), scales out dynamically in response to triggers, and maintains pre-warmed instances to avoid cold start latency.

Adım Adım Çözüm

1
Analyze execution duration constraints.
The execution limit rules out the standard Consumption plan.
Azure Functions on a Consumption plan have a default execution timeout of 5 minutes and a maximum limit of 10 minutes. A 25-minute execution requires a Premium or Dedicated plan.
2
Evaluate network isolation requirements.
Confirm outbound Virtual Network integration is supported.
Securely connecting to a database inside a private VNet requires regional VNet integration, which is only supported by Premium and Dedicated hosting plans.
3
Compare scaling, cold start mitigation, and pricing models.
Choose the Premium plan to satisfy dynamic scaling and pre-warmed instance requirements.
The Dedicated plan requires custom autoscale configuration and bills continuously for idle resources. The Premium plan dynamically scales instances to match trigger load while keeping pre-warmed instances to avoid cold starts.

Anahtar Kavram

Azure Functions Hosting Plans features and constraints
Soru 137Soru

You are deploying a multi-container group to Azure Container Instances (ACI) using a YAML manifest. The application container needs to pull a private image from an Azure Container Registry (ACR) named `myregistry.azurecr.io`.

The manifest contains the following snippet:

yaml
identity:
type: SystemAssigned
imageRegistryCredentials:
- server: myregistry.azurecr.io
identity: system

When you run `az container create`, the deployment fails with an image pull authentication error.

Which configuration change must you implement in the YAML manifest to resolve the issue?

Cevabı ve açıklamayı göster

Cevap: Configure a user-assigned managed identity in the YAML manifest, assign it to the container group, and set the identity property under imageRegistryCredentials to the resource ID of the user-assigned identity.

Cevap

Configure a user-assigned managed identity in the YAML manifest, assign it to the container group, and set the identity property under imageRegistryCredentials to the resource ID of the user-assigned identity.
To pull an image from a private Azure Container Registry using a managed identity, you must use a user-assigned managed identity. System-assigned managed identities cannot be used for this purpose because the identity is created and assigned only after the container group is deployed, which occurs after the image pull phase. Specifying the user-assigned identity's resource ID in both the identity block and the imageRegistryCredentials section allows the ACI service to authenticate to the registry during the deployment process.

Adım Adım Çözüm

1
Identify the phase at which the authentication failure occurs.
The failure occurs during the image pull phase, which takes place before the container group's system-assigned identity is created or active.
An identity must be active and resolved prior to the creation of the container group in order to authenticate the initial image pull from a private registry.
2
Select the appropriate managed identity type.
A user-assigned managed identity is chosen because it exists independently of the container group and is active prior to resource creation.
Only user-assigned managed identities can be referenced to authenticate container image pulls from a private registry at container group creation time.
3
Update the YAML manifest with the identity configuration.
Add the user-assigned identity's resource ID to the identity section and point to it in the imageRegistryCredentials section.
The ACI resource provider requires explicit mapping of the user-assigned identity in both the identity definition and registry credentials blocks to perform the authentication handshake.

Anahtar Kavram

Authenticating ACI to private ACR using Managed Identities
Soru 138Soru

You are developing a nightly data aggregation pipeline using Azure Durable Functions (.NET Isolated process). The orchestrator function is triggered daily to collect sales reports from multiple regional API endpoints, consolidate them, and write the summary to a database.

The orchestrator code is defined as follows:

csharp
[Function("AggregateDailySalesOrchestrator")]
public static async Task<SalesSummary> Run(
[OrchestrationTrigger] TaskOrchestrationContext context)
{
var regions = await context.CallActivityAsync<List<string>>("GetActiveRegions", null);

var tasks = new List<Task<RegionReport>>();
foreach (var region in regions)
{
tasks.Add(context.CallActivityAsync<RegionReport>("FetchRegionReport", region));
}

// Fan-out: wait for all parallel fetch operations to complete
var reports = await Task.WhenAll(tasks);

// Fan-in processing
var summary = new SalesSummary { RunId = Guid.NewGuid().ToString() };
foreach (var report in reports)
{
if (report.Timestamp >= DateTime.UtcNow.AddHours(-24))
{
summary.TotalRevenue += report.Revenue;
}
}

await context.CallActivityAsync("SaveSummaryToDatabase", summary);
return summary;
}

During testing under heavy loads, you observe that the `FetchRegionReport` activity function occasionally takes up to 1212 minutes to complete due to slow external APIs, resulting in execution failures. The Function App is currently deployed to an Azure Functions Consumption plan.

Which action must you take to ensure that the orchestration runs successfully, executes without timeouts, and produces deterministic results?

Cevabı ve açıklamayı göster

Cevap: Migrate the Function App to a Premium plan to support the 1212-minute activity execution duration; in the orchestrator code, replace Guid.NewGuid() with context.NewGuid() and replace DateTime.UtcNow with context.CurrentUtcDateTime.

Cevap

Migrate the Function App to a Premium plan to support the 1212-minute activity execution duration; in the orchestrator code, replace Guid.NewGuid() with context.NewGuid() and replace DateTime.UtcNow with context.CurrentUtcDateTime.
Upgrading the hosting plan to a Premium plan allows activity functions to run up to 3030 minutes (or unbound), preventing timeouts during the 1212-minute external API calls. Additionally, replacing Guid.NewGuid() and DateTime.UtcNow with context.NewGuid() and context.CurrentUtcDateTime guarantees that the orchestrator function remains deterministic during replays, preventing runtime mismatches or execution errors.

Adım Adım Çözüm

1
Analyze the hosting plan execution limits for the activity function.
Identify that the Consumption plan has a maximum timeout of 1010 minutes, which causes the 1212-minute activity execution to fail.
To allow the activity function to run for 1212 minutes, the app must be migrated to a plan supporting longer execution, such as the Premium plan.
2
Evaluate the orchestrator function code for determinism violations.
Identify that Guid.NewGuid().ToString() and DateTime.UtcNow are non-deterministic APIs.
Orchestrator code is replayed multiple times to rebuild its state, so all operations inside the orchestrator must return the exact same result on every execution.
3
Replace non-deterministic APIs with Durable-safe alternatives.
Use context.NewGuid() for unique identifier generation and context.CurrentUtcDateTime for fetching the replay-safe current time.
The Durable runtime intercepts these context-specific APIs and records their initial outputs in the execution history, ensuring consistent results during replays.

Anahtar Kavram

Durable Functions orchestrator constraints and hosting plan execution limits
Tahmini Süre:3m 0s
Soru 139Soru

A gaming company is developing an Azure Cosmos DB database to support a new multiplayer battle arena game. The workload has the following profiles:

- Write profile: Approximately 50,00050,000 writes per second during peak hours to update active match telemetry and state.
- Read profile: Low-latency point reads to fetch the active state of a specific match.
- Transactional boundary: Multiple documents within a single match—specifically the session state document and individual player statistics—must be updated atomically using a Transactional Batch.

The document properties include:
- `gameSessionId`: A unique GUID identifying each match (high cardinality, thousands of concurrent sessions).
- `playerId`: A unique GUID identifying each player (high cardinality).
- `region`: The geographic region of the game server (low cardinality, e.g., 'US-West', 'EU-Central').
- `sessionDate`: The date of the session (e.g., '2026-07-16').

Which partition key should you choose for the container?

Cevabı ve açıklamayı göster

Cevap: gameSessionId

Cevap

The partition key should be gameSessionId.
Selecting gameSessionId as the partition key is the correct strategy. In Azure Cosmos DB, all operations in a Transactional Batch must share the same partition key value. Because the transaction needs to atomically update the session state and the stats of all players within a specific match, grouping these records under a shared gameSessionId satisfies this transactional requirement. Additionally, since there are thousands of concurrent sessions, gameSessionId has high cardinality, which distributes storage and the write workload of 50,00050,000 writes per second evenly across physical partitions, preventing the hot partition problem.

Adım Adım Çözüm

1
Analyze the transactional boundary requirements.
Cosmos DB requires all operations in a Transactional Batch to target the same logical partition key.
This rules out partitioning by playerId, because a game session involves multiple players whose documents would reside in different partitions.
2
Evaluate fields for cardinality and write distribution.
region and sessionDate have very low cardinality, which concentrates 50,00050,000 writes per second on a subset of physical partitions.
Even throughput distribution is required to avoid hot partitions and rate-limiting (HTTP 429429 errors).
3
Select the key that satisfies both transaction and scaling requirements.
gameSessionId has high cardinality and groups all documents (session status and player stats) for a single match together.
This allows transactional batches to succeed while ensuring even write distribution across physical partitions.

Anahtar Kavram

Selecting a partition key in Azure Cosmos DB to align with transaction boundaries and maintain high cardinality to prevent hot partitions.
Tahmini Süre:1m 30s
Soru 140Soru

A developer is configuring an Azure Cosmos DB account. The application requires that reads must never see out-of-order writes. However, the application can tolerate some replication lag and must not rely on client-managed session tokens. Which two consistency levels meet these requirements? (Select two)

Geçerli olan tümünü seçin

Cevabı ve açıklamayı göster

Cevap: Bounded Staleness; Consistent Prefix

Cevap

Consistent Prefix and Bounded Staleness are the correct options because they both guarantee that reads never see out-of-order updates (maintaining write order) while allowing replication lag and not requiring client-managed session tokens.
Consistent Prefix and Bounded Staleness both guarantee that updates are returned in the order they were written (Consistent Prefix). Bounded Staleness adds a constraint on how far behind the writes the reads can lag (based on time TT or version count KK), whereas Consistent Prefix allows arbitrary lag as long as order is preserved. Neither requires managing session tokens.

Adım Adım Çözüm

1
Evaluate the order requirement
The application requires that reads never see out-of-order writes. This means the consistency level must support Consistent Prefix. Strong, Bounded Staleness, Session, and Consistent Prefix support this, but Eventual does not.
Eliminates Eventual consistency as a candidate.
2
Evaluate the replication lag requirement
The application can tolerate replication lag. Strong consistency does not allow replication lag, as reads must always return the most recent write.
Eliminates Strong consistency as a candidate.
3
Evaluate the session token requirement
The application must not rely on client-managed session tokens. Session consistency requires sharing/using session tokens to guarantee consistency bounds. Bounded Staleness and Consistent Prefix do not require session tokens.
Eliminates Session consistency, leaving Bounded Staleness and Consistent Prefix as the correct choices.

Anahtar Kavram

Azure Cosmos DB consistency levels and their guarantees regarding order, replication lag, and session token dependency.
ÖncekiSayfa 7 / 49Sonraki