Tüm alıştırma soruları
972 soru
You are developing a .NET background worker service that processes media rendering tasks from an Azure Service Bus queue. The rendering tasks are computationally intensive and take between 2 to 4 minutes to complete. The queue's default lock duration is set to 30 seconds. You must ensure that tasks are not processed by multiple workers concurrently, and if a worker crashes during processing, the task must be returned to the queue without message loss. Which configuration strategy should you implement?
You are developing a C# backend application that retrieves product inventory data. You must implement the Cache-Aside data pattern to cache inventory status using an Azure Cache for Redis instance and the StackExchange.Redis SDK. The cache connection must be initialized lazily and thread-safely.
Order the steps to implement the sequence of operations for retrieving product inventory data on a request.
Öğeleri doğru sıraya koymak için sürükleyin
You are deploying a V4 Azure Function App on a Consumption plan. The Function App contains an Azure Service Bus queue-triggered function that integrates with a legacy on-premises system. During periods of high traffic, the Function App scales out and opens too many concurrent connections to the legacy system, causing it to crash. You need to limit the scale-out of the Function App to a maximum of 10 instances while maintaining the Consumption plan to minimize costs. Which configuration should you apply?
A cloud-native microservices application deployed on Azure Kubernetes Service (AKS) logs telemetry to a shared Azure Application Insights workspace. You need to write a Kusto Query Language (KQL) query to analyze dependency calls that failed in the last 24 hours. The query must join the dependency logs with custom event telemetry to retrieve the name of the failing dependency and the custom event name, using the `operation_Id` column.
To minimize resource consumption and query execution time, which KQL query should you use?
| where timestamp > ago(24h) and success == false
| join kind=inner (
customEvents
| where timestamp > ago(24h)
) on operation_Id
| project dependencyName = name, eventName = name1
| where timestamp > ago(24h) and success == false
| join kind=inner customEvents on operation_Id
| project dependencyName = name, eventName = name1
| where success == false
| join kind=inner customEvents on operation_Id
| where timestamp > ago(24h)
| project dependencyName = name, eventName = name1
| where success == false
| join kind=inner (
customEvents
| where timestamp > ago(24h)
) on operation_Id
| project dependencyName = name, eventName = name1
A company hosts a high-traffic e-commerce web application named CartService on Azure App Service. The application runs on a Standard (S1) App Service plan. During flash sales, the application experiences sudden traffic surges, causing incoming requests to queue up before they can be processed by the web workers. You need to configure an Azure Monitor autoscale rule to scale out the App Service plan instances to handle the queued requests. Which metric should you select to trigger the scale-out rule?
You manage a Premium tier Azure Cache for Redis instance that supports a high-throughput session state and lookup service. The cache stores two classes of data: user session tokens configured with an explicit Time-To-Live (TTL) of 20 minutes, and static configuration metadata configured without a TTL. During peak traffic events, the cache experiences high memory pressure and latency spikes due to replication synchronization overhead between the primary and replica nodes. You must configure the cache so that under memory pressure, only the user session tokens that have not been accessed recently are evicted, the static configuration metadata is never evicted automatically, and sufficient memory is reserved to accommodate replication and failover overhead. Which combination of configuration settings should you apply?
You are deploying a containerized service to Azure Container Instances (ACI) that must pull its image from a private Azure Container Registry (ACR). Once running, the application inside the container must retrieve an API key from Azure Key Vault. You want to use a single managed identity to authenticate both the image pull from ACR and the secret retrieval from Key Vault. Which configuration should you use?
A gaming platform uses Azure Cosmos DB API for NoSQL to store player profiles and game state. The database account has a single write region in East US and a read replica in West US. Players connect to the game via stateless Web APIs running in both regions. The platform must ensure that when a player updates their profile, they immediately see their own updates on subsequent page refreshes, even if their requests are routed to different instances of the Web API. The client application retrieves and passes the SDK session token between requests. Other players can tolerate a delay in seeing these updates. Which consistency level should you configure for the Azure Cosmos DB account to meet these requirements with the lowest Request Unit (RU) cost?
You are developing a multiplayer gaming platform that stores player session data in Azure Cosmos DB using the SQL API and the .NET SDK v3. The Cosmos DB account is configured with Session consistency. The platform consists of two independent microservices running on separate server instances, each initializing its own CosmosClient instance.
Microservice A writes a new session document to the database. Immediately after, Microservice B must read that same session document to validate a lobby entry request. You must ensure that Microservice B reads the latest session state (read-your-writes guarantee) while maintaining the lowest possible read latency and avoiding hot partition issues under high write volume.
Which code segment should you implement to satisfy these requirements?
// Microservice A:
PlayerSession session = new PlayerSession { Id = "session_987", UserId = "user_123", IsActive = true };
ItemResponse<PlayerSession> writeResponse = await containerA.CreateItemAsync<PlayerSession>(
session,
new PartitionKey(session.UserId)
);
string token = writeResponse.Headers.Session;
// Microservice B:
ItemResponse<PlayerSession> readResponse = await containerB.ReadItemAsync<PlayerSession>(
session.Id,
new PartitionKey(session.UserId),
new ItemRequestOptions { SessionToken = token }
);
// Microservice A:
PlayerSession session = new PlayerSession { Id = "session_987", UserId = "user_123", IsActive = true };
ItemResponse<PlayerSession> writeResponse = await containerA.CreateItemAsync<PlayerSession>(
session,
new PartitionKey(session.IsActive.ToString().ToLower())
);
string token = writeResponse.Headers.Session;
// Microservice B:
ItemResponse<PlayerSession> readResponse = await containerB.ReadItemAsync<PlayerSession>(
session.Id,
new PartitionKey(session.IsActive.ToString().ToLower()),
new ItemRequestOptions { SessionToken = token }
);
// Microservice A:
PlayerSession session = new PlayerSession { Id = "session_987", UserId = "user_123", IsActive = true };
await containerA.CreateItemAsync<PlayerSession>(
session,
new PartitionKey(session.UserId)
);
// Microservice B:
ItemResponse<PlayerSession> readResponse = await containerB.ReadItemAsync<PlayerSession>(
session.Id,
new PartitionKey(session.UserId)
);
// Microservice A:
PlayerSession session = new PlayerSession { Id = "session_987", UserId = "user_123", IsActive = true };
await containerA.CreateItemAsync<PlayerSession>(
session,
new PartitionKey(session.UserId)
);
// Microservice B:
ItemResponse<PlayerSession> readResponse = await containerB.ReadItemAsync<PlayerSession>(
session.Id,
new PartitionKey(session.UserId),
new ItemRequestOptions { SessionToken = session.UserId }
);
You are developing a background worker application that runs in Azure Container Apps. The application must scale dynamically based on the message count of an Azure Service Bus queue. You plan to use a user-assigned managed identity to authenticate the container app's scale rules with the Service Bus namespace.
Which sequence of steps should you perform to configure the scaling and security?
Öğeleri doğru sıraya koymak için sürükleyin
You manage a web application named EduLearn that is currently hosted on a Free () App Service plan. During peak hours, the application experiences high CPU utilization and becomes slow. You want to implement an automated scaling solution to handle the load and ensure the application remains responsive, while also preventing autoscale flapping. You plan to configure these settings via the Azure CLI.
How should you order the steps to configure the autoscaling solution?
Öğeleri doğru sıraya koymak için sürükleyin
You are managing a CPU-intensive web API named TelemetryProcessor that runs on an Azure App Service Web App. The application is currently hosted on a Shared (D1) App Service plan. During peak hours, the application experiences performance degradation due to CPU spikes. You need to configure the App Service plan to scale out automatically during CPU spikes, ensure the configuration is cost-effective, and prevent autoscale flapping.
Which sequence of steps should you perform to configure the scaling behavior?
Öğeleri doğru sıraya koymak için sürükleyin
You are developing a C# (.NET Isolated process) Durable Function to transcode and analyze video files. The workflow implements a Fan-out/Fan-in pattern: it first calls a transcoding activity, then launches parallel analysis activities on the transcoded video, and finally aggregates the results.
To ensure the durability of the execution, the Durable Functions runtime uses event sourcing and replays the orchestrator function.
You need to sequence the lifecycle and replay steps of this workflow from the initial client request to the completion of the orchestration.
In which order do these events occur during the execution of this workflow?
Öğeleri doğru sıraya koymak için sürükleyin
You are developing a C# background service that must safely update the content of an existing blob named config.json in Azure Blob Storage. To prevent concurrency conflicts, your service must lock the blob using a lease before performing the upload and release the lease immediately afterward. You are using the Azure.Storage.Blobs (v12) SDK.
Order the steps required to implement this lease-based upload workflow.
Öğeleri doğru sıraya koymak için sürükleyin
You are developing an API gateway solution using Azure API Management (APIM). The API must implement rate limiting based on a client's subscription ID and cache the backend responses to reduce backend load. The rate limiting should trigger if a client makes more than 100 requests per 60 seconds. Responses must be cached for 3600 seconds.
Complete the XML policy definition by filling in the blanks. What are the correct XML elements for blank 1, blank 2, and blank 3?
Aşağıdaki boşlukları doldurun
<inbound>
<base />
< calls="100" renewal-period="60" counter-key="@(context.Subscription.Id)" />
< vary-by-developer="false" vary-by-developer-groups="false" downstream-caching-type="none" />
</inbound>
<outbound>
<base />
< duration="3600" />
</outbound>
</policies>
A backend service named ReportRunner handles report generation and is deployed to an Azure App Service Web App. The App Service is currently running on the Basic (B1) tier. During peak monthly billing cycles, report generation jobs stall because of resource constraints, and you must configure autoscale to automatically add instances when CPU utilization exceeds .
Which of the following actions should you perform first to support this requirement?
You are developing an ASP.NET Core web application that will authenticate users using the Microsoft Identity Platform and then call a downstream web API. You need to configure Microsoft Entra ID and the application to enable this confidential client authentication scenario. Which two configuration steps are required? (Select two.)
Geçerli olan tümünü seçin
An e-commerce application uses an Azure Cosmos DB SQL API container named `Orders` partitioned by `/customerId`. You are implementing two new independent microservices:
* `OrderArchiver` to archive order documents to Azure Blob Storage.
* `InventoryUpdater` to update external inventory counts.
Both microservices will scale out across multiple host instances, and both are configured to use the same lease container named `leases`. During testing, you observe that when both microservices are running, each order event is processed by either `OrderArchiver` or `InventoryUpdater`, but never by both.
You need to ensure that all instances of both microservices process every event from the change feed.
What should you do?
A smart home IoT solution uses Azure Service Bus to route command messages to individual smart devices. The commands for each device must be processed in the exact order they are received to prevent state conflicts. You are configuring a .NET application using the Azure.Messaging.ServiceBus SDK to process these command messages for one device session at a time, settle the processed messages, and release the session so that other workers can pick up different device sessions.
In which order should you execute the code steps to achieve this?
Öğeleri doğru sıraya koymak için sürükleyin
A globally distributed web application uses an Azure Cosmos DB API for NoSQL account with Session consistency. The account has a write region in East US and a read region in West US. Users report that when they update their profile on a mobile app and immediately view it on a web browser, the updates are not visible. You need to resolve this issue in the most cost-effective manner while maintaining low latency. Which of the following actions should you perform?