Microsoft Certified: Azure Developer Associate (AZ-204) practice questions

228 free questions with answers and explanations.

Practice test
  1. 1.A company is migrating an existing application to Azure. The application currently uses a file share to store configuration files and user-uploaded documents. These files need to be accessible from multiple virtual machines (VMs) running on Azure, using the Server Message Block (SMB) protocol. Data redundancy is critical, and the solution must be cost-effective. Which Azure storage solution should be recommended?Develop for Azure storage
  2. 2.A developer is implementing a feature where an application needs to store temporary, small messages (up to 64 KB) that will be processed asynchronously by backend workers. The messages should be ordered and persist for a configurable period if the workers are offline. Which Azure storage service is most appropriate for this scenario?Develop for Azure storage
  3. 3.A global content delivery network (CDN) uses Azure Blob Storage to host static website content and large media files. To ensure high availability and disaster recovery, the storage account is configured for Geo-Redundant Storage (GRS). However, the CDN requires read access to the secondary region even if the primary region is unavailable, without a full failover. Which additional configuration should be applied to the GRS storage account?Develop for Azure storage
  4. 4.An application uses Azure Blob Storage to store millions of small log files (average size 10 KB). These files are rarely accessed after 7 days but must be retained for compliance for 5 years. The company wants to minimize storage costs while ensuring data availability for audit purposes. Retrieving the data for audits can tolerate delays of several hours. Which access tier is MOST appropriate for these log files after 7 days?Develop for Azure storage
  5. 5.A web application uses Azure Cosmos DB to store user profiles. The application experiences unpredictable spikes in traffic, leading to varying throughput requirements. To optimize costs and performance, the developer wants Cosmos DB to automatically scale its throughput based on demand.Develop for Azure storage
  6. 6.A financial application stores transaction details in Azure Cosmos DB. Each transaction has a unique TransactionID and is associated with a CustomerID. Queries frequently involve retrieving all transactions for a given CustomerID and occasionally retrieving a specific transaction by its TransactionID. To optimize query performance and distribution, how should you configure the partitioning strategy for the Cosmos DB container?Develop for Azure storage
  7. 7.A developer is writing code to manage blobs in Azure Blob Storage. The application needs to retrieve a list of all JPEG images stored within a specific virtual folder (e.g., 'photos/2023/'). The solution should be efficient and avoid downloading unnecessary blob metadata. Which method should the developer use?Develop for Azure storage
  8. 8.A manufacturing plant uses Azure Queue Storage to process messages from factory sensors. Each message contains telemetry data that needs to be processed by a backend service. Due to intermittent network issues, the backend service occasionally fails to process a message completely. The developer needs to ensure that a failed message is automatically returned to the queue for reprocessing after a short delay, without immediately being available to other consumers.Develop for Azure storage
  9. 9.A manufacturing company uses Azure Queue Storage to process messages from factory sensors. Each message represents a sensor reading and must be processed exactly once, even if the processing worker fails. The worker application pulls messages, processes them, and then deletes them. What mechanism in Azure Queue Storage ensures that a message is not processed multiple times in case of a worker failure?Develop for Azure storage
  10. 10.A developer needs to implement a solution to store configuration settings for a microservices application. These settings are small, frequently updated, and require fast read access. The data structure is simple, consisting of key-value pairs with a few additional properties per setting. Which Azure storage service is the MOST suitable for this scenario?Develop for Azure storage
  11. 11.A company is migrating an on-premises application that stores configuration files and shared log files on a network file share. The application requires a file system interface (SMB/NFS) and needs to be accessible from multiple Azure Virtual Machines simultaneously. The solution must also provide built-in redundancy within a single Azure region.Develop for Azure storage
  12. 12.A global e-commerce platform uses Azure Cosmos DB to store product catalog information. The platform experiences peak traffic during seasonal sales events, requiring the database to scale throughput dynamically. It also needs to minimize operational overhead for capacity management. Which Cosmos DB feature should be configured to meet these requirements?Develop for Azure storage
  13. 13.A company is migrating an on-premises application that stores configuration files and shared application logs on a network file share. The application requires SMB protocol access and needs to seamlessly integrate with existing Windows-based servers. Which Azure Storage solution should the developer choose to minimize application code changes?Develop for Azure storage
  14. 14.A manufacturing plant uses an IoT solution to collect telemetry data from thousands of sensors. This data is time-series in nature, arriving as small JSON payloads. The solution needs to store this data efficiently, enable fast queries based on time ranges, and support schema evolution without downtime. Which Azure Cosmos DB API is best suited for this scenario?Develop for Azure storage
  15. 15.A company is developing a new application that processes high volumes of sensor data from IoT devices. The data arrives as JSON documents, needs to be stored with low latency, and requires flexible schema capabilities. The application frequently queries this data using arbitrary attributes. Which Azure Cosmos DB API is most suitable for this scenario?Develop for Azure storage
  16. 16.A developer is building a mobile application that needs to store small amounts of structured data, such as user preferences and application settings. This data must be highly available and resilient, but does not require complex joins or relationships. The solution needs to be cost-effective for millions of entities with simple key-value lookups. Which Azure Storage solution is the most appropriate?Develop for Azure storage
  17. 17.A company stores customer order data in Azure Cosmos DB. Each order document contains a `customerId` and an `orderId`. The application frequently queries orders by a specific `customerId` and also needs to retrieve individual orders very quickly using both `customerId` and `orderId`. The development team needs to choose an optimal partitioning strategy to ensure low latency and cost-effective operations.Develop for Azure storage
  18. 18.A company is developing a new application that will process high volumes of telemetry data from IoT devices. The data is time-series in nature, requiring fast writes and efficient querying across time ranges and device IDs. The solution must support millions of data points per second and scale globally. Which Azure Cosmos DB API is the MOST appropriate for this scenario?Develop for Azure storage
  19. 19.A developer is designing a new microservices-based application that needs to store infrequently accessed, large log files. These log files are retained for compliance reasons but are rarely read after 30 days. The primary goal is to minimize storage costs while ensuring the data is still accessible when needed.Develop for Azure storage
  20. 20.An application uses Azure Blob Storage to store millions of small log files (average size 10 KB). These files are rarely accessed after the first 30 days but must be retained for compliance purposes for 5 years. The company wants to minimize storage costs while ensuring the files remain accessible if needed. Which blob access tier should be used for these log files after 30 days?Develop for Azure storage
  21. 21.A developer is writing a .NET application that needs to interact with Azure Blob Storage. The application will perform operations such as uploading files, downloading files, and listing blobs within a container. Which NuGet package should the developer install to access Azure Blob Storage programmatically?Develop for Azure storage
  22. 22.A developer is building a .NET application that needs to interact with Azure Blob Storage to upload and download files. The application should leverage the latest features and best practices for interacting with Azure Storage. Which NuGet package should the developer use to achieve this?Develop for Azure storage
  23. 23.A company is developing a new application that will store user-generated content, including photos and short videos. These files will be uploaded frequently and need to be immediately available for viewing by other users. The application also requires a robust mechanism for handling eventual consistency across multiple regions, ensuring data integrity even if a region becomes temporarily unavailable. Which Azure Blob Storage replication strategy best meets these requirements?Develop for Azure storage
  24. 24.A company is developing a new application that stores large binary files, such as images and videos. These files need to be accessible globally with low latency. The company also requires that the files be immutable once uploaded and that previous versions can be retrieved. Which Azure storage solution should you recommend?Develop for Azure storage
  25. 25.A developer is designing a system that requires storing vast amounts of unstructured, semi-structured, and structured data, including images, videos, documents, and log files. The data needs to be accessible globally with low latency for reads and writes, and the system must be highly scalable to accommodate petabytes of data. Which Azure storage service is the MOST appropriate for this requirement?Develop for Azure storage
  26. 26.A global e-commerce platform uses Azure Cosmos DB for its product catalog. The platform is deployed in multiple Azure regions (e.g., East US, West US, Europe North). Product data is updated in a primary region (East US) but read frequently by users worldwide. To ensure that users always see the most up-to-date product information, even if there's a slight delay in replication, and to handle potential primary region outages gracefully, which consistency level should be configured for the Cosmos DB account?Develop for Azure storage
  27. 27.A web application uses Azure Cosmos DB for its product catalog. The application frequently reads product data from various geographic regions. While strong consistency is preferred, the business can tolerate slightly stale data (a few seconds) to achieve higher throughput and lower latency for read operations, especially from remote regions. Which consistency level should you configure for the Cosmos DB account?Develop for Azure storage
  28. 28.A developer is implementing a new feature for a web application that allows users to upload large files (up to several GBs) to Azure Blob Storage. To improve upload reliability and performance, especially over unreliable networks, the developer wants to use a mechanism that uploads parts of a file concurrently and allows for resuming uploads if interrupted.Develop for Azure storage
  29. 29.A developer is creating an application that stores customer order data in Azure Cosmos DB. Each order document contains an 'orderId', 'customerId', and 'orderDate'. The application frequently queries orders by 'customerId' and 'orderDate' to display historical purchases, and also occasionally queries by 'orderId' for specific order details. To optimize query performance and distribution, which primary key (partition key and item ID) strategy should be implemented?Develop for Azure storage
  30. 30.A developer is creating an application that needs to store and retrieve large binary files, such as video clips and high-resolution images. These files will be accessed frequently by users worldwide. The solution must provide high availability, extreme scalability, and geo-redundancy with read access to the secondary region.Develop for Azure storage
  31. 31.A developer needs to store highly sensitive customer documents in Azure Blob Storage. These documents must be encrypted at rest and in transit. The company's security policy mandates that encryption keys must be managed by the customer, not by Microsoft. Which encryption option should the developer choose?Develop for Azure storage
  32. 32.A financial application uses Azure Cosmos DB for its transaction history. The application requires that all reads reflect the most recent write, regardless of the user's geographical location. Data consistency is paramount, even if it means slightly higher latency for read operations. Which Cosmos DB consistency model should be configured?Develop for Azure storage
  33. 33.A company is developing a new application that will store highly sensitive customer data, including personally identifiable information (PII), in Azure Blob Storage. The company has a strict security policy requiring that all data at rest be encrypted using customer-managed keys (CMK) for enhanced control and compliance. The application will use a .NET SDK to interact with Azure Blob Storage.Develop for Azure storage
  34. 34.A web application stores user profile images in Azure Blob Storage. These images are frequently accessed for the first 30 days, then rarely accessed for the next 90 days, and finally almost never accessed but must be retained for compliance. To optimize costs, the company wants to automatically move blobs between tiers based on their access patterns. Which Azure Blob Storage feature should be implemented?Develop for Azure storage
  35. 35.A company is developing a new application that stores large binary files, such as images and videos. The application requires the ability to retain previous versions of these files whenever they are modified or deleted, allowing for point-in-time recovery and compliance auditing. Which Azure Blob Storage feature should be enabled to meet this requirement?Develop for Azure storage
  36. 36.An application is designed to store sensor data from IoT devices. The data is high-volume, time-series, and unstructured JSON documents. The development team needs a NoSQL database that can handle millions of small writes per second, provide flexible schema, and allow for efficient querying of time-series data.Develop for Azure storage
  37. 37.A global e-commerce platform uses Azure Cosmos DB for its product catalog. The platform experiences peak traffic during global sales events, requiring extremely low latency reads for product details from users worldwide. Updates to the product catalog are infrequent. To ensure the lowest possible read latency globally, which Cosmos DB configuration should be prioritized?Develop for Azure storage
  38. 38.A company is migrating an on-premises application that uses a shared file system to store configuration files and user-generated content. The application requires SMB protocol access and needs to be accessible from multiple Azure Virtual Machines within the same region. The solution must provide high availability and be managed by Azure. Which Azure storage solution should the company use?Develop for Azure storage
  39. 39.A company stores customer profile data in Azure Table Storage. Each customer profile has a unique CustomerID and is associated with a Region. Queries frequently involve retrieving a specific customer's profile by CustomerID and also retrieving all customers within a specific Region. To optimize both query types, what is the most effective way to design the PartitionKey and RowKey for the table?Develop for Azure storage
  40. 40.An application uses Azure Blob Storage to store millions of small log files (average size 10 KB). These files are rarely accessed after the first 30 days but must be retained for compliance reasons for 7 years. Retrieving these files can tolerate several hours of delay. To minimize storage costs, which Blob Storage access tier should you configure for files older than 30 days?Develop for Azure storage
  41. 41.A global e-commerce platform uses Azure Cosmos DB for its product catalog. The platform experiences high read traffic from users worldwide. To minimize latency for read operations, the company has configured Cosmos DB with multiple read regions. How can the application code ensure that read requests are consistently directed to the closest available replica?Develop for Azure storage
  42. 42.A developer is implementing a feature that requires a temporary, shared storage for small, structured messages that need to be processed asynchronously by multiple worker roles. The messages should be simple text and not exceed 64 KB in size. The solution needs to be highly available and durable, but the order of processing is not strictly critical. Which Azure storage service is the most appropriate and cost-effective for this scenario?Develop for Azure storage
  43. 43.A developer is building a .NET application that needs to list all blobs within a specific virtual directory (folder) in an Azure Blob Storage container. The virtual directory structure is 'category/subcategory/item.jpg'. The developer wants to retrieve only the blobs under 'images/thumbnails/'.Develop for Azure storage
  44. 44.A developer is designing a new microservices-based application that needs to store infrequently accessed, unstructured data, such as archived documents and historical logs. The data must be highly durable and cost-effective for long-term retention, with occasional retrieval needs. Which Azure Storage solution is most appropriate for this scenario?Develop for Azure storage
  45. 45.A developer needs to store unstructured sensor data (JSON format) from IoT devices into Azure. The data arrives at extremely high volume and velocity, and queries will primarily involve filtering and aggregating data based on timestamps and device IDs. The solution must support rapid ingestion and flexible schema. Which Azure storage service is best suited for this scenario?Develop for Azure storage
  46. 46.A web application uses Azure Cosmos DB for its product catalog. The application frequently performs point reads (retrieving a single item by its ID) and range queries (retrieving items within a category). To minimize latency and ensure high availability, the Cosmos DB account is configured for multi-region writes. The product catalog data is updated infrequently but read very often. Which consistency level should be configured for the Cosmos DB account to balance strong consistency for writes with low-latency reads, while still allowing for some eventual consistency during failovers?Develop for Azure storage
  47. 47.A developer is implementing a new feature for a web application that allows users to upload large video files. These files need to be stored securely and made available for streaming after processing. During the upload process, the application must ensure data integrity and prevent corruption. Which Azure Blob Storage upload method is most suitable for handling large files while ensuring data integrity?Develop for Azure storage
  48. 48.A developer is creating an application that processes orders. When an order is placed, a message needs to be sent to a backend processing service that might experience intermittent unavailability. The messages must be guaranteed to be delivered at least once, and the processing service should be able to retrieve messages in the order they were sent. Which Azure service should the developer use?Develop for Azure storage
  49. 49.A developer needs to store unstructured sensor data (JSON format) from IoT devices into Azure. Each data point includes a `DeviceId`, a `Timestamp`, and various sensor readings. The data will be queried based on `DeviceId` and `Timestamp` ranges. The solution must support rapid ingestion of millions of data points per second, scale globally, and allow for flexible schema changes. Which Azure storage service is best suited for this scenario?Develop for Azure storage
  50. 50.A company is developing a new application that will store user-generated content, including photos and videos. The application needs to ensure high availability and durability of the stored data, even in the event of a regional outage. It also requires the ability to read data from a secondary region to improve read performance for geographically dispersed users. Which Azure Blob Storage redundancy option best meets these requirements?Develop for Azure storage