Ngân hàng đề — Microsoft Azure Developer

Tìm thấy 409 câu.

Câu 381
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.

After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear on the review screen.

You are developing an application that needs to react to events from multiple Azure services, such as Azure Blob Storage and Azure Resource Manager, in near-real time.

The application must meet the following requirements:

•Handle a high volume of events without manual intervention.
•Receive only specific events relevant to your application, based on event types or resource patterns.
•Ensure that no events are missed, even if the processing application is temporarily unavailable.
•Use Azure Functions for processing events without managing any infrastructure.
•Minimize the amount of custom code required for event routing and handling.

You need to develop the solution.

Solution: Use Azure Logic Apps to poll the Azure services for changes at regular intervals. Apply conditional logic within the Logic Apps to filter relevant events. Trigger Azure Functions from the Logic Apps to process the filtered events.

Does the solution meet the goal?
  1. A Yes
  2. B No
Xem giải thích

🧩 Phân tích chi tiết câu hỏi trắc nghiệm

📘 Nội dung câu hỏi:
Câu hỏi này thuộc dạng series scenario trong kỳ thi chứng chỉ (có thể là AZ-204 hoặc tương tự), nơi mô tả một tình huống phát triển ứng dụng trên Azure cần phản ứng với sự kiện (events) từ nhiều dịch vụ Azure như Azure Blob Storage và Azure Resource Manager ở chế độ near-real time (gần thời gian thực).

Các yêu cầu cụ thể của ứng dụng:

  • Xử lý high volume of events (lượng sự kiện lớn) mà không cần can thiệp thủ công.
  • Chỉ nhận specific events liên quan, dựa trên event types hoặc resource patterns.
  • Không bỏ lỡ bất kỳ event nào, ngay cả khi ứng dụng xử lý tạm thời unavailable.
  • Sử dụng Azure Functions để xử lý events mà không quản lý infrastructure.
  • Giảm thiểu custom code cho event routing và handling.

Giải pháp đề xuất (Solution): Sử dụng Azure Logic Apps để poll (kiểm tra định kỳ) các dịch vụ Azure thay đổi theo khoảng thời gian đều đặn. Áp dụng conditional logic trong Logic Apps để filter events liên quan, rồi trigger Azure Functions từ Logic Apps để xử lý.

Câu hỏi chính: Giải pháp này có đáp ứng mục tiêu (meet the goal) không?

✅ Đáp án đúng: No
Lý do lựa chọn: Giải pháp này KHÔNG đáp ứng đầy đủ các yêu cầu, chủ yếu vì cơ chế polling của Logic Apps không hỗ trợ near-real time (chỉ kiểm tra định kỳ, dẫn đến độ trễ cao). Nó cũng không đảm bảo 100% không bỏ lỡ events (có thể miss events nếu interval polling lớn hoặc ứng dụng unavailable lâu), và không tối ưu cho high volume events (tốn tài nguyên, polling liên tục). Các dịch vụ Azure như Azure Event Grid mới là lựa chọn lý tưởng cho event-driven architecture near-real time, với tích hợp sẵn Azure Functions, filtering, và đảm bảo delivery (at-least-once). Logic Apps phù hợp hơn cho workflow orchestration, không phải event streaming cao tải. (Dựa trên tài liệu Azure cập nhật 2024-2026: Event Grid hỗ trợ push-based events với dead-lettering để tránh mất events).

🛠️ Giải thích tất cả các phương án trả lời

  • Yes ❌ SAI
    Phương án này sai vì giải pháp không meet the goal. Polling trong Logic Apps gây độ trễ (latency) không đạt near-real time (thường vài giây đến phút, tùy interval). Không đảm bảo no events missed (nếu polling miss thay đổi giữa các lần check, hoặc Logic Apps scale chậm với high volume). Dù có filter conditional và trigger Functions (giảm custom code), nhưng không phải giải pháp event-driven tối ưu – Azure khuyến nghị Event Grid cho push events, subscription filtering dựa trên event types/resource patterns, và retry/dead-letter để tránh mất events. Polling tốn chi phí và không scalable cho high volume mà không manual intervention.

  • No ✅ ĐÚNG
    Phương án này đúng vì giải pháp KHÔNG đáp ứng các yêu cầu cốt lõi. Cụ thể:

    • ❌ Near-real time: Polling là pull-based, không push-based như Event Grid (latency <1s).
    • ❌ High volume & no manual intervention: Polling dễ overload với lượng events lớn, cần tune interval thủ công.
    • ⚠️ No events missed: Không có built-in retry queue như Event Grid Topics/Subscriptions. Nếu Logic Apps down, events giữa các poll sẽ mất.
    • ✅ Azure Functions & minimize code: Phần này OK, nhưng tổng thể fail.
      Giải pháp thay thế lý tưởng: Azure Event Grid + Event Grid Trigger trong Azure Functions (serverless, auto-scale, filtering native, dead-letter storage).

📚 Tài liệu tham khảo (cập nhật mới nhất đến 2026)

  • Azure Event Grid docs: Event Grid for reactive programming – Nhấn mạnh push model, filtering, reliability (2024 updates: Enhanced filtering với SQL-like syntax và resource patterns).
  • Logic Apps vs Event Grid: Compare Logic Apps and Event Grid – Polling không recommended cho real-time events.
  • AZ-204 Exam Guide: Microsoft Learn – Scenario-based questions ưu tiên Event Grid cho Azure services events (Blob, ARM).
  • Azure Functions Event Triggers: Event Grid Trigger – Serverless, no infra, minimize code (2025 preview: AI-assisted filtering).

Hy vọng phân tích này giúp bạn ôn thi hiệu quả! 🚀 Nếu cần giải pháp thay thế chi tiết, hãy hỏi thêm nhé!

Câu 382
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.

After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.

You have an Azure App Service plan named APSPlan1 set to the Basic B1 pricing tier. APSPlan1 contains an App Service web app named WebApp1.

You plan to enable schedule-based autoscaling for APSPlan1.

You need to minimize the cost of running WebApp1.

Solution: Scale down ASPPlan1 to the Shared pricing tier.

Does the solution meet the goal?
  1. A Yes
  2. B No
Xem giải thích

🧩 Phân tích chi tiết nội dung câu hỏi

Câu hỏi thuộc dạng "Does the solution meet the goal?" trong kỳ thi chứng chỉ Azure (có thể là AZ-104 hoặc tương tự), nơi bạn phải đánh giá một giải pháp cụ thể có đạt được mục tiêu hay không. Bối cảnh (scenario):

  • Bạn có một Azure App Service plan tên APSPlan1 đang chạy ở mức giá Basic B1.
  • Trong plan này có một App Service web app tên WebApp1.
  • Mục tiêu (goal):
    1. Bật tính năng schedule-based autoscaling (tự động scale theo lịch trình, ví dụ: scale up vào giờ cao điểm, scale down vào giờ thấp điểm).
    2. Giảm thiểu chi phí (minimize the cost) khi chạy WebApp1.

Giải pháp đề xuất (Solution): Scale down APSPlan1 xuống mức giá Shared pricing tier (tier chia sẻ tài nguyên, rẻ nhất).

Câu hỏi: Giải pháp này có đạt được mục tiêu không? (Yes/No).

📘 Lưu ý từ AWS? Người dùng đề cập "Chủ đề liên quan đến AWS" nhưng nội dung thực tế là Azure App Service (Microsoft Azure). Tôi sẽ phân tích dựa trên kiến thức Azure cập nhật đến năm 2026 (theo docs chính thức Microsoft, không thay đổi cơ bản từ 2023-2026).

✅ Đáp án đúng: No

Lý do lựa chọn:
Giải pháp không đạt mục tiêu vì Shared tier không hỗ trợ bất kỳ tính năng autoscaling nào, bao gồm cả schedule-based. Hiện tại đang ở Basic B1 (hỗ trợ metric-based autoscale nhưng KHÔNG hỗ trợ schedule-based). Để bật schedule-based autoscaling, cần Standard tier trở lên (rẻ nhất là S1). Scale down sang Shared chỉ tiết kiệm chi phí nhưng làm mất khả năng autoscaling, vi phạm mục tiêu chính. Để minimize cost đúng cách: Scale up sang Standard S1 (vẫn rẻ hơn Premium).

🛠️ Kiến thức cập nhật Azure 2026:

  • Shared tier (D1): Không hỗ trợ autoscale. Chỉ phù hợp dev/test nhỏ.
  • Basic B1: Hỗ trợ metric-based autoscale (CPU/Memory/HTTP queue), nhưng KHÔNG hỗ trợ schedule/recurrence.
  • Standard S1 trở lên: Hỗ trợ đầy đủ schedule-based autoscale (scale theo lịch trình hàng ngày/tuần).

📋 Giải thích tất cả các phương án

Dưới đây là phân tích từng lựa chọn giữ nguyên văn bản gốc tiếng Anh, với lý do đúng/sai bằng tiếng Việt:

  • Yes ❌ SAI:
    Phương án này sai vì scale down sang Shared tier sẽ vô hiệu hóa hoàn toàn autoscaling. Shared tier chỉ dành cho workload nhẹ, không hỗ trợ tự động scale theo lịch trình (hoặc bất kỳ autoscale nào). Giải pháp chỉ minimize cost nhưng không enable được schedule-based autoscaling, nên không meet the goal kép (enable + minimize).

  • No ✅ ĐÚNG:
    Phương án này đúng vì giải pháp đề xuất không đạt mục tiêu. Shared tier rẻ hơn Basic B1 nhưng thiếu hỗ trợ schedule-based autoscaling (yêu cầu Standard tier). Để thành công: Giữ Basic cho metric autoscale hoặc nâng Standard S1 cho schedule (cost thấp nhất khả thi). Giải pháp vi phạm yêu cầu enable tính năng.

📚 Tài liệu tham khảo (Azure docs cập nhật 2026)

Hy vọng phân tích giúp bạn ôn thi hiệu quả! 🚀 Nếu cần thêm scenario liên quan, hỏi nhé!

Câu 383
You have an Azure Queue Storage account that contains a queue named queue1.

You plan to use Azure SDK for .NET to develop a solution that uses queue1.

You need to author C# code that will return an approximate number of messages in queue1. Your solution must minimize the development effort.

Which method should you use in your code?
  1. A GetProperties method of the QueueClient class
  2. B GetProperties method of the QueueServiceClient class
  3. C PeekMessages method of the QueueClient class
  4. D GetStatistics method of the QueueServiceClient class
Xem giải thích

🧩 Phân tích nội dung câu hỏi

Câu hỏi tập trung vào Azure Queue Storage trong Microsoft Azure, cụ thể là cách sử dụng Azure SDK for .NET (phiên bản mới nhất Azure.Storage.Queues v12.x trở lên, cập nhật đến năm 2026) để phát triển giải pháp lấy số lượng message xấp xỉ (approximate number of messages) trong một queue có tên queue1.

📌 Yêu cầu chính:

  • Sử dụng C# code với QueueClient hoặc các class liên quan.
  • Giải pháp phải tối ưu hóa nỗ lực phát triển (minimize development effort), nghĩa là chọn method đơn giản nhất, không cần loop qua messages hay xử lý phức tạp.
  • Không cần đọc nội dung message, chỉ lấy count xấp xỉ (vì Azure Queue chỉ cung cấp approximate count để tránh overhead).

Mục tiêu: Trả về ApproximateMessagesCount mà không tốn tài nguyên.

✅ Đáp án đúng: GetProperties method of the QueueClient class

Lý do chọn 🛠️:
Method GetProperties() (hoặc GetPropertiesAsync() trong .NET) của class QueueClient trả về object QueueProperties, chứa thuộc tính ApproximateMessagesCount – chính xác là số lượng message xấp xỉ trong queue cụ thể (queue1). Đây là cách đơn giản nhất, chỉ cần 1 lệnh gọi API, không cần parse thêm dữ liệu. Code mẫu ngắn gọn:

QueueClient queue = new QueueClient(connectionString, "queue1");
QueueProperties properties = await queue.GetPropertiesAsync();
long approxCount = properties.ApproximateMessagesCount.Value;

Phù hợp hoàn hảo với yêu cầu minimize effort! 🚀

📋 Giải thích tất cả các phương án (dùng kiến thức Azure SDK mới nhất)

Dưới đây là phân tích từng lựa chọn, đánh dấu ✅ đúng hoặc ❌ sai, giữ nguyên văn bản gốc:

  • ✅ [ĐÚNG] GetProperties method of the QueueClient class
    🟢 Giải thích: Như trên, method này trực tiếp cung cấp QueueProperties.ApproximateMessagesCount cho queue cụ thể qua QueueClient. Hiệu quả cao, O(1) thời gian, không đọc message. Lý tưởng cho dev effort thấp. (Nguồn: Azure.Storage.Queues docs - QueueClient.GetPropertiesAsync).

  • ❌ [SAI] GetProperties method of the QueueServiceClient class
    🔴 Giải thích: QueueServiceClient.GetProperties() chỉ lấy service-level properties (như CORS, analytics settings) của toàn bộ storage account, không có thông tin về queue cụ thể như count messages. Không thể dùng để lấy approximate count của queue1. Sai hoàn toàn! (Nguồn: QueueServiceClient docs).

  • ❌ [SAI] PeekMessages method of the QueueClient class
    🔴 Giải thích: PeekMessages() dùng để peek (xem trước) nội dung một số messages mà không dequeue, trả về PeekedMessage[]. Không có thuộc tính count tổng, và để lấy approximate count phải peek tất cả messages (không khả thi với queue lớn, tốn effort cao). Không minimize development! (Nguồn: QueueClient.PeekMessagesAsync docs).

  • ❌ [SAI] GetStatistics method of the QueueServiceClient class
    🔴 Giải thích: QueueServiceClient.GetStatistics() trả về storage account statistics (như capacity, availability), không bao gồm message count của queue riêng lẻ. Chỉ dùng cho monitoring account-wide, không áp dụng cho queue1. Không chính xác và không hiệu quả. (Nguồn: QueueServiceClient.GetStatisticsAsync docs).

📘 Tài liệu tham khảo chính (cập nhật 2026)

Hy vọng phân tích này giúp bạn nắm vững! Nếu cần code demo đầy đủ, hỏi thêm nhé! 😊

Câu 384
You are developing several Azure API Management (APIM) hosted APIs.

You must transform the APIs to hide private backend information and obscure the technology stack used to implement the backend processing.

You need to protect all APIs.

What should you do?
  1. A Configure and apply a new inbound policy scoped to a product.
  2. B Configure and apply a new outbound policy scoped to the operation.
  3. C Configure and apply a new outbound policy scoped to global.
  4. D Configure and apply a new backend policy scoped to global.
Xem giải thích

🧩 Phân tích chi tiết câu hỏi trắc nghiệm

📘 Nội dung câu hỏi:
Câu hỏi tập trung vào việc phát triển các API được host trên Azure API Management (APIM). Yêu cầu chính là biến đổi (transform) các API để:

  • Ẩn thông tin backend riêng tư (hide private backend information), ví dụ như các header hoặc dữ liệu nhạy cảm lộ ra từ server backend.
  • Che giấu công nghệ stack được sử dụng để triển khai xử lý backend (obscure the technology stack), chẳng hạn như loại bỏ các header tiết lộ framework (như "Server: nginx" hoặc "X-Powered-By: PHP").
    Mục tiêu là bảo vệ TẤT CẢ các API (protect all APIs), nghĩa là áp dụng giải pháp ở mức toàn cục, không giới hạn ở một API cụ thể.
    🛠️ Bối cảnh kỹ thuật: Trong APIM, các policy là công cụ mạnh mẽ để kiểm soát luồng dữ liệu inbound (từ client đến backend) và outbound (từ backend về client). Để "transform" response nhằm ẩn thông tin, cần can thiệp vào outbound policy (sau khi nhận response từ backend), và áp dụng ở global scope để bao phủ tất cả APIs.

✅ Đáp án đúng: Configure and apply a new outbound policy scoped to global.
Lý do lựa chọn (dựa trên tài liệu Azure APIM mới nhất đến 2026):
Outbound policy được thực thi sau khi backend trả về response, cho phép loại bỏ hoặc chỉnh sửa các header/dữ liệu lộ thông tin backend (ví dụ: sử dụng <set-header> hoặc <remove-header> để xóa "Server", "X-AspNet-Version"). Scoped to global đảm bảo policy áp dụng cho toàn bộ APIM instance, bảo vệ tất cả APIs mà không cần cấu hình riêng lẻ. Đây là best practice theo Microsoft để obfuscate backend và tăng security.
📚 Nguồn tham khảo:

🔍 Giải thích tất cả các phương án (đúng/sai)

  • ❌ Configure and apply a new inbound policy scoped to a product.
    Phân tích sai: Inbound policy chỉ thực thi trước khi gọi backend (request từ client), không thể transform response từ backend để ẩn thông tin. Scoped to product chỉ áp dụng cho một nhóm APIs cụ thể (không phải tất cả), không đáp ứng yêu cầu "protect all APIs". Không phù hợp để obscure tech stack ở response.

  • ❌ Configure and apply a new outbound policy scoped to the operation.
    Phân tích sai: Outbound policy đúng hướng (transform response), nhưng scoped to operation chỉ áp dụng cho một operation cụ thể (phương thức HTTP của một API), không bao quát tất cả APIs. Phải cấu hình lặp lại cho từng operation, không hiệu quả cho "protect all APIs".

  • ✅ Configure and apply a new outbound policy scoped to global.
    Phân tích đúng: Như đã giải thích ở trên. Outbound xử lý response hoàn hảo để ẩn backend info (remove headers nhạy cảm), và global scope áp dụng toàn cục cho mọi API/product/operation trong APIM instance. Đây là cách tối ưu, scalable nhất theo docs Microsoft (ví dụ policy XML: <policies><inbound /><outbound><remove-header name="Server" /></outbound></policies> ở global level).

  • ❌ Configure and apply a new backend policy scoped to global.
    Phân tích sai: Backend policy chủ yếu dùng để cấu hình địa chỉ backend service (như forward-request-to-backend), không phải để transform response nhằm ẩn thông tin. Dù scoped to global, nó không cung cấp các công cụ như set/remove-header ở outbound. Không đáp ứng yêu cầu obfuscate tech stack từ response.

Câu 385
You have a workspace-based Azure Application Insights resource named Insights1 and an Azure App Service Web App named App1. Insights1 collects telemetry generated by App1.

You plan to evaluate the alerting functionality of the availability testing that is enabled for App1 by taking it offline for 50 minutes.

You create a standard availability test for App1, set its frequency to 15 minutes, and set its alert status to Enabled.

You need to assess the number of alerts that you should expect by taking App1 offline for 50 minutes.

How many alerts should you expect?
  1. A 1
  2. B 2
  3. C 3
  4. D 4
Xem giải thích

🧩 Phân tích nội dung câu hỏi

Câu hỏi xoay quanh Azure Application Insights và Azure App Service, cụ thể là chức năng availability testing (kiểm tra tính sẵn sàng) và alerting (cảnh báo).

  • Bạn có một workspace-based Application Insights resource tên Insights1 thu thập dữ liệu telemetry từ Azure App Service Web App tên App1.
  • Kế hoạch: Tắt App1 offline trong 50 phút để kiểm tra chức năng alerting của availability test.
  • Thực hiện: Tạo standard availability test (kiểm tra tính sẵn sàng chuẩn) cho App1, với frequency 15 phút (chạy test mỗi 15 phút), và alert status Enabled (bật trạng thái cảnh báo).
  • Mục tiêu: Xác định số lượng alerts (cảnh báo) mong đợi khi App1 offline 50 phút.

🛠️ Điểm mấu chốt: Availability test chạy định kỳ mỗi 15 phút từ nhiều vị trí (locations) Azure. Khi app offline, các test sẽ fail (thất bại). Tuy nhiên, alert rule được tạo tự động khi enable alerting KHÔNG gửi nhiều alerts liên tục để tránh "alert storm" (cơn bão cảnh báo), mà chỉ kích hoạt một alert duy nhất khi tình trạng chuyển từ healthy sang unhealthy, và giữ trạng thái firing cho đến khi recover.

✅ Đáp án đúng và lý do chọn

Đáp án đúng: 1
📘 Lý do: Trong Azure Monitor (tích hợp Application Insights), alert rule cho standard availability test được thiết kế stateful (có trạng thái). Khi test đầu tiên fail (sau ~15 phút đầu tiên), alert fire lần đầu và chuyển sang trạng thái firing/severe. Các test fail tiếp theo (tại 30', 45') KHÔNG tạo alert mới, mà chỉ duy trì trạng thái firing đến khi app online trở lại. Trong 50 phút offline (~3-4 test cycles), chỉ có 1 alert duy nhất. Đây là hành vi mặc định để giảm noise, theo tài liệu Azure cập nhật đến 2026.

📋 Giải thích chi tiết tất cả các phương án

  • 1 ✅ Đúng: Như phân tích trên, chỉ 1 alert được gửi do cơ chế stateful của Azure Monitor metric alerts. Alert rule (tạo tự động từ availability test) đánh giá metric "Availability" hoặc "Test Duration/Failures", fire một lần khi vượt threshold (thường >0% failed) và resolve khi healthy. Trong 50 phút, nhiều failures nhưng chỉ 1 notification.

  • 2 ❌ Sai: Không phải 2 alerts. Người chọn có thể nghĩ chỉ 2 test cycles (30/15=2), nhưng bỏ qua cơ chế stateful – chỉ 1 alert duy nhất cho toàn bộ downtime.

  • 3 ❌ Sai: Không phải 3 alerts. Có thể tính toán 50/15 ≈ 3.3 → 3 tests fail (tại 15', 30', 45'), nhưng Azure không fire alert mỗi test fail, tránh spam. Chỉ 1 alert cho chuỗi failures liên tục.

  • 4 ❌ Sai: Không phải 4 alerts. Có lẽ nhầm với số locations (standard test dùng ~4 locations) hoặc test cycles +1, nhưng thực tế vẫn chỉ 1 alert do alert rule không repeat notifications trong trạng thái firing.

📚 Tài liệu tham khảo (cập nhật mới nhất đến 2026)

Hy vọng phân tích này giúp bạn nắm vững! Nếu cần demo code ARM template cho availability test, hãy hỏi nhé! 🚀

Câu 386
You have an Azure subscription named Sub1 that contains a resource group named RG1 and a Service Bus queue named SB1.

You plan to implement an Azure Event Grid push event subscription that will deliver an event to SB1 whenever a resource is created, modified, or deleted in RG1. You must minimize the development and configuration efforts.

You need to create an Event Grid topic for your planned implementation.

Which type of event topic should you create?
  1. A event domain
  2. B custom
  3. C system
  4. D namespace
Xem giải thích

🧩 Phân tích chi tiết nội dung câu hỏi

Câu hỏi xoay quanh việc triển khai Azure Event Grid trong một subscription Azure tên Sub1, chứa resource group RG1 và Service Bus queue SB1.
Mục tiêu: Tạo một push event subscription từ Event Grid để gửi sự kiện đến SB1 mỗi khi có tài nguyên (resource) trong RG1 được tạo mới (created), sửa đổi (modified) hoặc xóa (deleted).
Yêu cầu quan trọng: Giảm thiểu nỗ lực phát triển và cấu hình (minimize development and configuration efforts).
Nhiệm vụ cụ thể: Chọn loại Event Grid topic phù hợp để triển khai.

Các sự kiện này thuộc loại platform events (sự kiện hệ thống từ Azure), cụ thể là từ provider Microsoft.Resources.ResourceGroups (sự kiện quản lý resource group như Microsoft.Resources.ResourceWriteSuccess, ResourceDeleteSuccess, v.v.). Do đó, cần một topic hỗ trợ tự động capture các sự kiện này mà không cần code tùy chỉnh nhiều.

📘 Tài liệu tham khảo:

✅ Đáp án đúng: system

Lý do lựa chọn:
System topic là loại topic tự động được Azure tạo cho các resource hỗ trợ Event Grid events, như resource groups hoặc subscriptions. Nó capture sẵn các sự kiện hệ thống (platform events) như tạo/sửa/xóa resource trong RG1 mà không cần phát triển code tùy chỉnh hay cấu hình phức tạp. Điều này hoàn toàn phù hợp với yêu cầu "minimize efforts", chỉ cần tạo event subscription push đến SB1 là xong. System topic hỗ trợ endpoint như Service Bus queue trực tiếp.

🛠️ Giải thích tất cả các phương án

  • event domain ❌ SAI:
    Event domain dùng cho fan-out lớn quy mô (domain-level events), thường trong partner scenarios hoặc publish-subscribe phức tạp. Nó không dành cho capture events từ resource group đơn giản, đòi hỏi cấu hình cao hơn và không tự động hỗ trợ platform events từ RG1 → Không giảm thiểu efforts.

  • custom ❌ SAI:
    Custom topic yêu cầu tự code và publish events thủ công từ ứng dụng. Không phù hợp vì events ở đây là system events từ Azure platform (không phải custom), dẫn đến phải phát triển SDK/publisher → Tăng efforts đáng kể, trái yêu cầu.

  • system ✅ ĐÚNG:
    Như đã giải thích ở trên: Tự động, hỗ trợ sẵn events từ resource groups (Microsoft.Resources.ResourceGroups), dễ cấu hình subscription push đến SB1 mà không code thêm. Hoàn hảo cho kịch bản này!

  • namespace ❌ SAI:
    Namespace thuộc Event Grid Domains hoặc Topics Namespaces (tính năng preview/advanced đến 2026), dùng quản lý nhiều topics con trong domain lớn. Không phải để capture events từ RG1, yêu cầu setup phức tạp → Không minimize efforts.

🧠 Lưu ý bổ sung: Với system topic, bạn có thể tạo qua Portal, CLI hoặc ARM template chỉ với vài lệnh, ví dụ: az eventgrid system-topic create --location <location> --resource-group RG1 --topic-type Microsoft.Resources.ResourceGroups --resource-name RG1. Hoàn toàn phù hợp kiến thức Azure Event Grid phiên bản mới nhất (hỗ trợ Service Bus trực tiếp làm endpoint).

Câu 387
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.

After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.

You have an Azure App Service plan named APSPlan1 set to the Basic B1 pricing tier. APSPlan1 contains an App Service web app named WebApp1.

You plan to enable schedule-based autoscaling for APSPlan1.

You need to minimize the cost of running WebApp1.

Solution: Scale out APSPlan1.

Does the solution meet the goal?
  1. A Yes
  2. B No
Xem giải thích

🧩 Phân tích nội dung câu hỏi

Câu hỏi thuộc dạng case study trong kỳ thi chứng chỉ Azure (như AZ-104 hoặc AZ-305), nơi có một tình huống chung và nhiều giải pháp riêng lẻ. Tình huống cụ thể:

  • Bạn có Azure App Service Plan tên APSPlan1 ở mức giá Basic B1 (giá rẻ, phù hợp cho app nhỏ, chỉ 1 instance cố định).
  • Bên trong plan này có WebApp1 (một web app).
  • Mục tiêu (goal):
    1. Kích hoạt schedule-based autoscaling (tự động scale theo lịch trình, ví dụ scale up/down theo giờ cao điểm).
    2. Tối thiểu hóa chi phí vận hành WebApp1.
  • Giải pháp đề xuất (Solution): Scale out APSPlan1 (tăng số lượng instances ngang - horizontal scaling).
  • Câu hỏi: Giải pháp này có đạt được mục tiêu không? (Yes/No).

Lưu ý quan trọng từ câu hỏi: Đây là phần thi không thể quay lại, và một số case có thể có >1 giải pháp đúng hoặc không có giải pháp đúng nào.
(Kiến thức dựa trên Azure App Service cập nhật đến 2026: Basic tier không hỗ trợ autoscaling; cần ít nhất Standard tier để enable schedule-based rules. Xem 📘 Azure Docs - App Service Plans và Autoscale Overview).

✅ Đáp án đúng: No

Lý do lựa chọn:
Giải pháp "Scale out" KHÔNG đạt mục tiêu vì:

  • Basic B1 tier không hỗ trợ autoscaling (kể cả schedule-based). Tier này chỉ cho phép 1 instance cố định, không thể scale out (tăng instances) hay autoscale.
  • Để enable schedule-based autoscaling, phải scale UP (nâng tier lên Standard S1 trở lên), nhưng giải pháp chỉ đề cập "scale out" – không giải quyết vấn đề tier.
  • Scale out ở Basic thậm chí không khả thi và tăng chi phí (vì Basic tính theo giờ/instance cố định, không linh hoạt). Mục tiêu minimize cost yêu cầu chọn tier rẻ nhất hỗ trợ autoscale (Standard), không phải scale out vô ích.
    🛠️ Cách đúng để minimize cost: Scale UP lên Standard S1 (rẻ nhất hỗ trợ autoscale), rồi config schedule rules (scale down về 1 instance giờ thấp điểm).

🧩 Giải thích tất cả các phương án

  • Yes ❌ SAI:
    Phương án này cho rằng "Scale out APSPlan1" sẽ enable schedule-based autoscaling và minimize cost. Lý do sai: Basic B1 KHÔNG hỗ trợ scale out (chỉ 1 instance max, không autoscale). Scale out không giải quyết vấn đề tier, dẫn đến KHÔNG enable được autoscaling và có thể tăng chi phí vô ích nếu cố ép (phải nâng tier trước). Không đạt goal kép.

  • No ✅ ĐÚNG:
    Phương án này chính xác vì giải pháp "Scale out" KHÔNG meet goal. Lý do đúng: Autoscaling yêu cầu Standard tier trở lên (theo docs Azure 2026). Scale out chỉ hoạt động sau khi scale up tier, và không minimize cost ở Basic (rẻ nhưng vô dụng). Giải pháp đúng thực tế: Scale UP + config autoscale rules để scale down giờ thấp điểm.

Tài liệu tham khảo chính:
📘 Azure App Service Pricing Tiers – Basic: No autoscale.
📘 Configure Autoscale – Yêu cầu Standard+.
(Dữ liệu cập nhật 2026: Không thay đổi cơ bản, chỉ thêm features như autoscale với AI ở PremiumV3, nhưng Basic vẫn hạn chế).

Câu 388
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.

After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear on the review screen.

You are developing an application that needs to react to events from multiple Azure services, such as Azure Blob Storage and Azure Resource Manager, in near-real time.

The application must meet the following requirements:

•Handle a high volume of events without manual intervention.
•Receive only specific events relevant to your application, based on event types or resource patterns.
•Ensure that no events are missed, even if the processing application is temporarily unavailable.
•Use Azure Functions for processing events without managing any infrastructure.
•Minimize the amount of custom code required for event routing and handling.

You need to develop the solution.

Solution: Configure Azure Event Grid system topics for each Azure service. Create event subscriptions with Advanced Filters to receive only the relevant events. Use Azure Functions with Event Grid triggers to process the events. Enable Dead-lettering on the event subscriptions to handle failures and ensure reliable delivery.

Does the solution meet the goal?
  1. A Yes
  2. B No
Xem giải thích

🧩 Phân tích chi tiết nội dung câu hỏi

Câu hỏi thuộc dạng case study (phân tích tình huống), nơi bạn đang phát triển một ứng dụng cần phản ứng gần thời gian thực (near-real time) với các sự kiện (events) từ nhiều dịch vụ Azure như Azure Blob Storage và Azure Resource Manager (ARM).

Yêu cầu cụ thể của ứng dụng:

  • Xử lý lượng sự kiện lớn (high volume) mà không cần can thiệp thủ công. 📈
  • Chỉ nhận sự kiện liên quan dựa trên loại sự kiện (event types) hoặc mẫu tài nguyên (resource patterns). 🔍
  • Không bỏ lỡ sự kiện nào, ngay cả khi ứng dụng xử lý tạm thời không khả dụng. ✅
  • Sử dụng Azure Functions để xử lý sự kiện mà không quản lý hạ tầng. ☁️
  • Giảm thiểu code tùy chỉnh cho việc định tuyến (routing) và xử lý sự kiện. 🛠️

Giải pháp đề xuất:

  • Cấu hình Azure Event Grid system topics cho từng dịch vụ Azure.
  • Tạo event subscriptions với Advanced Filters để lọc sự kiện liên quan.
  • Sử dụng Azure Functions với Event Grid triggers để xử lý.
  • Bật Dead-lettering trên subscriptions để xử lý thất bại và đảm bảo giao hàng đáng tin cậy.

Câu hỏi chính: Giải pháp này có đáp ứng đầy đủ các yêu cầu không? (Yes/No).

📘 Tài liệu tham khảo:

✅ Đáp án đúng: Yes

Lý do lựa chọn: Giải pháp hoàn toàn đáp ứng tất cả yêu cầu nhờ các tính năng cốt lõi của Azure Event Grid (phiên bản mới nhất đến 2026):

  • System topics tự động tạo cho các dịch vụ như Blob Storage và ARM, hỗ trợ high volume events mà không cần thủ công. 📊
  • Advanced Filters (subject/event type filters, data-based filters) lọc chính xác sự kiện theo patterns, giảm thiểu code tùy chỉnh cho routing. 🔧
  • Dead-lettering lưu sự kiện thất bại vào queue/storage, đảm bảo retry tự động và không mất dữ liệu ngay cả khi Functions tạm unavailable (lên đến 24h retention). 🔄
  • Azure Functions với Event Grid trigger là serverless, auto-scale cho high volume, không quản lý infra, và code tối giản (chỉ handler logic). ⚡ Tổng thể, Event Grid làm trung gian routing đáng tin cậy, giảm code xuống mức thấp nhất. ✅

📋 Giải thích tất cả các phương án

  • Yes:
    ✅ Đúng. Phương án này khớp hoàn hảo với yêu cầu vì Event Grid được thiết kế chính xác cho near-real-time pub/sub, hỗ trợ tất cả features: system topics cho native Azure services, advanced filtering (bao gồm SQL-like queries từ 2023+), dead-lettering (tích hợp Azure Storage Queue), và seamless integration với Functions triggers. Không cần custom code cho infra/routing, đảm bảo durability cao (at-least-once delivery với retries). Hoàn toàn phù hợp kiến trúc serverless hiện đại.

  • No:
    ❌ Sai. Không có lý do nào để chọn "No" vì giải pháp không vi phạm bất kỳ yêu cầu nào. Nếu chọn No, có thể nhầm lẫn với các dịch vụ cũ như Event Hubs (không có system topics dễ dàng cho Blob/ARM) hoặc thiếu dead-lettering (nhưng giải pháp đã có). Event Grid là lựa chọn tối ưu nhất cho scenario này theo best practices AWS/Azure 2026.

Câu 389
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.

After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.

You have an Azure App Service plan named APSPlan1 set to the Basic B1 pricing tier. APSPlan1 contains an App Service web app named WebApp1.

You plan to enable schedule-based autoscaling for APSPlan1.

You need to minimize the cost of running WebApp1.

Solution: Scale up ASPPlan1 to the Premium V2 pricing tier.

Does the solution meet the goal?
  1. A Yes
  2. B No
Xem giải thích

🧩 Phân tích chi tiết câu hỏi

📖 Nội dung câu hỏi:
Câu hỏi thuộc dạng tình huống thực tế trong kỳ thi chứng chỉ Azure (như AZ-104), nơi bạn có một Azure App Service plan tên APSPlan1 đang ở mức giá Basic B1 (mức cơ bản, chi phí thấp). Plan này chứa một web app tên WebApp1.
Mục tiêu: Kích hoạt autoscaling dựa trên lịch trình (schedule-based autoscaling) cho APSPlan1, đồng thời giảm thiểu chi phí tối đa (minimize the cost) khi chạy WebApp1.
Giải pháp đề xuất: Nâng cấp (scale up) APSPlan1 lên mức giá Premium V2.
Câu hỏi chính: Giải pháp này có đạt được mục tiêu (meet the goal) không?
✅ Lưu ý ngữ cảnh: Đây là câu hỏi kiểu "series" (các câu liên quan), không quay lại được sau khi trả lời. Kiến thức dựa trên Azure App Service cập nhật đến năm 2026 (phiên bản mới nhất: autoscaling rules hỗ trợ Standard tier trở lên với Azure Autoscale).

✅ Đáp án đúng: No

Lý do chọn đáp án đúng (bằng tiếng Việt):
Giải pháp scale up lên Premium V2 KHÔNG đạt mục tiêu minimize cost vì:

  • Basic B1 không hỗ trợ autoscaling (chỉ manual scale).
  • Để kích hoạt schedule-based autoscaling, chỉ cần nâng lên Standard tier (S1 trở lên) là đủ – rẻ hơn nhiều so với Premium V2.
  • Premium V2 (PV2) hỗ trợ autoscaling nâng cao (như hơn CPU/memory, staging slots), nhưng chi phí cao gấp 5-10 lần Standard (khoảng $0.10/giờ cho S1 vs. $0.50+/giờ cho PV2). Nâng lên PV2 làm tăng chi phí không cần thiết, vi phạm mục tiêu "minimize cost".
    🛠️ Giải pháp tối ưu để minimize cost: Scale up đến Standard S1 (hỗ trợ schedule-based autoscale với chi phí thấp nhất có thể).

🧐 Giải thích tất cả các phương án

  • Yes ❌ SAI
    Phương án này sai vì scale up đến Premium V2 tuy kích hoạt được schedule-based autoscaling (hỗ trợ từ Standard tier), nhưng tăng chi phí đáng kể (Premium V2 đắt hơn Standard nhiều lần). Không đáp ứng mục tiêu "minimize the cost of running WebApp1".

  • No ✅ ĐÚNG
    Phương án này đúng vì giải pháp đề xuất KHÔNG tối ưu chi phí. Azure chỉ yêu cầu Standard tier (không phải Premium) để enable schedule-based autoscale. Premium V2 phù hợp cho workload lớn hơn (nhiều instances, advanced features), nhưng ở đây chỉ cần autoscale cơ bản → chọn Standard để tiết kiệm.

📘 Tài liệu tham khảo (cập nhật 2026)

  • Azure App Service Pricing Tiers 🗂️ (Xác nhận Basic: no autoscale; Standard: schedule/rules hỗ trợ).
  • Autoscale App Service 📈 (Schedule-based từ Standard tier; Premium cho advanced).
  • Pricing Calculator 💰 (So sánh B1 ~$0.075/giờ vs. S1 ~$0.10/giờ vs. PV2 ~$0.52/giờ).
    Lưu ý: Dữ liệu giá tham khảo vùng US East, có thể thay đổi nhẹ theo region/thời gian.
Câu 390 Chọn nhiều đáp án
Case study -

This is a case study. Case studies are not timed separately. You can use as much exam time as you would like to complete each case. However, there may be additional case studies and sections on this exam. You must manage your time to ensure that you are able to complete all questions included on this exam in the time provided.

To answer the questions included in a case study, you will need to reference information that is provided in the case study. Case studies might contain exhibits and other resources that provide more information about the scenario that is described in the case study. Each question is independent of the other questions in this case study.

At the end of this case study, a review screen will appear. This screen allows you to review your answers and to make changes before you move to the next section of the exam. After you begin a new section, you cannot return to this section.


To start the case study -
To display the first question in this case study, click the Next button. Use the buttons in the left pane to explore the content of the case study before you answer the questions. Clicking these buttons displays information such as business requirements, existing environment, and problem statements. When you are ready to answer a question, click the Question button to return to the question.


Background -

Munson’s Pickles and Preserves Farm is an agricultural cooperative corporation based in Washington, US, with farms located across the United States. The company supports agricultural production resources by distributing seeds fertilizers, chemicals, fuel, and farm machinery to the farms.


Current Environment -

The company is migrating all applications from an on-premises datacenter to Microsoft Azure. Applications support distributors, farmers, and internal company staff.


Corporate website -
•The company hosts a public website located at http://www.munsonspicklesandpreservesfarm.com. The site supports farmers and distributors who request agricultural production resources.


Farms -
•The company created a new customer tenant in the Microsoft Entra admin center to support authentication and authorization for applications.


Distributors -
•Distributors integrate their applications with data that is accessible by using APIs hosted at http://www.munsonspicklesandpreservesfarm.com/api to receive and update resource data.


Requirements -

The application components must meet the following requirements:


Corporate website -
•The site must be migrated to Azure App Service.
•Costs must be minimized when hosting in Azure.
•Applications must automatically scale independent of the compute resources.
•All code changes must be validated by internal staff before release to production.
•File transfer speeds must improve, and webpage-load performance must increase.
•All site settings must be centrally stored, secured without using secrets, and encrypted at rest and in transit.
•A queue-based load leveling pattern must be implemented by using Azure Service Bus queues to support high volumes of website agricultural production resource requests.


Farms -
•Farmers must authenticate to applications by using Microsoft Entra ID.


Distributors -
•The company must track a custom telemetry value with each API call and monitor performance of all APIs.
•API telemetry values must be charted to evaluate variations and trends for resource data.


Internal staff -
•App and API updates must be validated before release to production.
•Staff must be able to select a link to direct them back to the production app when validating an app or API update.
•Staff profile photos and email must be displayed on the website once they authenticate to applications by using their Microsoft Entra ID.


Security -
•All web communications must be secured by using TLS/HTTPS.
•Web content must be restricted by country/region to support corporate compliance standards.
•The principle of least privilege must be applied when providing any user rights or process access rights.
•Managed identities for Azure resources must be used to authenticate services that support Microsoft Entra ID authentication.


Issues -


Corporate website -
•Farmers report HTTP 503 errors at the same time as internal staff report that CPU and memory usage are high.
•Distributors report HTTP 502 errors at the same time as internal staff report that average response times and networking traffic are high.
•Internal staff report webpage load sizes are large and take a long time to load.
•Developers receive authentication errors to Service Bus when they debug locally.


Distributors -
•Many API telemetry values are sent in a short period of time. Telemetry traffic, data costs, and storage costs must be reduced while preserving a statistically correct analysis of the data points sent by the APIs.


You need to implement farmer authentication.

Which three actions should you perform? Each correct answer presents part of the solution.

NOTE: Each correct selection is worth one point.
  1. A Add the shared access signature (SAS) token to the app.
  2. B Create a shared access signature (SAS) token.
  3. C Create a user flow.
  4. D Add the app to the user flow.
  5. E Register the app in Microsoft Entra ID.
Xem giải thích

🧩 Phân tích chi tiết nội dung câu hỏi

Câu hỏi thuộc phần case study của kỳ thi chứng chỉ Microsoft Azure (cụ thể là AZ-204 hoặc tương tự), tập trung vào việc triển khai xác thực (authentication) cho farmers (người nông dân) sử dụng Microsoft Entra ID (tên mới của Azure Active Directory - Azure AD từ năm 2023).

Bối cảnh chính từ case study:

  • Công ty Munson’s Pickles and Preserves Farm đang di chuyển ứng dụng từ on-premises sang Azure.
  • Họ đã tạo một customer tenant mới trong Microsoft Entra admin center dành riêng cho xác thực và phân quyền ứng dụng (đây là Entra ID B2C tenant, hỗ trợ người dùng bên ngoài như farmers và distributors).
  • Yêu cầu cụ thể cho Farms: "Farmers must authenticate to applications by using Microsoft Entra ID." Nghĩa là farmers cần đăng nhập vào ứng dụng bằng Entra ID.
  • Câu hỏi yêu cầu chọn ba hành động (three actions) để triển khai xác thực này. Mỗi lựa chọn đúng đáng 1 điểm.
  • Vấn đề liên quan: Không trực tiếp đề cập authentication cho farmers, nhưng có lỗi authentication với Service Bus (SAS token), KHÔNG liên quan đến user authentication.

Mục tiêu: Triển khai quy trình xác thực người dùng bên ngoài (external users như farmers) qua user flows trong Entra ID B2C, vì đây là tenant dành cho customers. Các bước chuẩn theo tài liệu Microsoft (cập nhật 2024-2026): Đăng ký app, tạo user flow, và liên kết app với user flow. 📘

Nguồn tham khảo:

✅ Đáp án đúng và lý do lựa chọn

Các đáp án đúng là ba hành động sau, tạo thành quy trình hoàn chỉnh để triển khai authentication cho farmers qua Entra ID B2C:

  • Create a user flow ✅: Tạo luồng xác thực (user flow) cho sign-up/sign-in.
  • Add the app to the user flow ✅: Liên kết ứng dụng với user flow để áp dụng.
  • Register the app in Microsoft Entra ID ✅: Đăng ký ứng dụng trước tiên để Entra ID nhận diện.

Lý do chọn:

  • Đây là các bước bắt buộc và theo thứ tự (register app → create user flow → add app to flow) theo best practices của Microsoft Entra ID B2C cho external users. Đảm bảo farmers có thể authenticate an toàn, tuân thủ yêu cầu "principle of least privilege" và managed identities. Không dùng SAS vì SAS chỉ dành cho Service Bus queues (liên quan đến issues khác). 🛠️

📋 Giải thích tất cả các phương án (đúng và sai)

Dưới đây là phân tích từng phương án một, giữ nguyên văn bản gốc bằng tiếng Anh. Mỗi phần giải thích hoàn toàn bằng tiếng Việt, đánh dấu ✅ (đúng) hoặc ❌ (sai) với lý do cụ thể dựa trên case study và docs mới nhất.

  • Add the shared access signature (SAS) token to the app.
    ❌ Sai: SAS token dùng để xác thực Service Bus queues (cho queue-based load leveling), không phải cho user authentication của farmers. Case study đề cập lỗi "authentication errors to Service Bus when debug locally" – đây là vấn đề riêng, không liên quan farmers. Sử dụng SAS ở đây vi phạm "Managed identities for Azure resources must be used" và không hỗ trợ Entra ID. 🗑️

  • Create a shared access signature (SAS) token.
    ❌ Sai: Tương tự trên, SAS chỉ dành cho Azure Service Bus (high volumes requests), không dùng cho authentication người dùng. Yêu cầu là "Farmers must authenticate... using Microsoft Entra ID", không phải SAS. Sử dụng SAS sẽ không đáp ứng security requirements như TLS/HTTPS và least privilege cho users. 🚫

  • Create a user flow.
    ✅ Đúng: Trong Entra ID B2C tenant, user flow là công cụ chính để tạo luồng xác thực (sign-up, sign-in) cho external users như farmers. Bước này định nghĩa policies (email/password, social login), tuân thủ "All site settings must be centrally stored, secured without using secrets". Thiết yếu sau khi register app. 🌟

  • Add the app to the user flow.
    ✅ Đúng: Sau khi tạo user flow, phải liên kết app (qua App ID) để ứng dụng (Azure App Service) sử dụng flow đó cho authentication. Đảm bảo farmers authenticate seamless, hỗ trợ "Staff profile photos and email must be displayed... using Microsoft Entra ID". Bước này hoàn tất integration. 🔗

  • Register the app in Microsoft Entra ID.
    ✅ Đúng: Bước đầu tiên: Đăng ký ứng dụng (App Service) trong Entra ID B2C tenant để lấy Client ID/Secret, hỗ trợ OAuth/OpenID Connect. Đây là prerequisite cho user flows, tuân thủ "Managed identities" và security. Không register thì không thể authenticate farmers. 🏗️

Kết luận: Chọn đúng 3 ✅ sẽ giải quyết hoàn hảo yêu cầu authentication, giảm thiểu costs và scale tự động theo Azure App Service. Nếu thi thật, hãy kiểm tra thứ tự thực hiện! 🎯