Background - Fabrikam Inc. is a global retail analytics company that provides AI-driven demand forecasting
and product recommendation services to online retailers. The company is modernizing its solution to run
entirely on Microsoft Azure. The platform ingests transaction data, generates embeddings for semantic
retrieval, performs vector similarity search, and returns product recommendations through containerized
microservices. Developers use Python and Azure SDKs. Operations teams manage container orchestration,
scaling, monitoring, and security. The solution must meet strict performance, scalability, and security
requirements. Current environment - Application architecture - The Recommendation engine is a customerfacing
HTTP API running as a containerized Python application. The engine is deployed to Azure Container
Apps (ACA). Embeddings are stored in Azure Database for PostgreSQL by using pgvector. Semantic retrieval
uses metadata filtering combined with vector similarity search. Azure Managed Redis is used as a caching
layer. Front-end and API workloads are deployed to Azure Container Apps (ACA). Batch model retraining
workloads run in Azure Kubernetes Service (AKS). Container and CI/CD - Container images are stored in
Azure Container Registry (ACR). CI/CD uses ACR Tasks to build images on commit. ACA environments
support revision management. AKS workloads are deployed by using Kubernetes manifest files stored in Git.
Monitoring - Logs are collected in Azure Monitor. Teams inspect container logs and Kubernetes events when
troubleshooting. Developers write KQL queries to analyze latency spikes. Business requirements - Customer
experience: Maintain a seamless, low-latency recommendation experience for end-users, even during
unpredictable seasonal traffic spikes. Operational cost efficiency: Minimize compute expenditures by
deallocating resources during periods of inactivity and by preventing runaway scaling costs. Data integrity
and freshness: Ensure that product recommendations always reflect the most current catalog metadata and
pricing to prevent customer dissatisfaction. Security and compliance: Adhere to a Zero Trust security model
by eliminating long-lived credentials and centralizing the management of all sensitive secrets. Global
scalability: Support the rapid ingestion of millions of new product embeddings daily without degrading query
performance for existing retailers. Technical requirements - Performance: Semantic search latency must
remain under 200 milliseconds at peak load. Database optimization: Use pgvector for embeddings and
implement metadata filtering to reduce compute overhead. Configure compute and memory appropriately for
vector workloads to ensure high-dimensional index residency in RAM and efficient mathematical throughput.
Vector similarity calculations must be performed only against products that satisfy mandatory metadata
constraints. Database performance: Database connections must support high concurrency with minimal
latency through the implementation of connection optimization. Data load strategy: To ensure maximum
ingestion throughput, secondary indexes must be applied only after bulk loading of embeddings is complete.
Caching: Redis cache entries must expire automatically after 10 minutes. Implement a reactive mechanism to
invalidate cache entries upon metadata updates. Identity: Use managed identities for all service-to-service and
service-to-database authentication. Plain-text credentials in configuration files are strictly prohibited. Secret
management: All secrets must be stored centrally. Secrets must be rotated automatically by using a centralized
lifecycle policy. Scaling: Use Kubernetes event-driven autoscaling (KEDA) for event-driven scaling. The
Recommendation API must scale based on HTTP traffic, while batch jobs must scale based on queue length
and support scale-to-zero. CI/CD: All images must be stored in Azure Container Registry. Use ACR Tasks to
automate image builds triggered by source code commits. Monitoring: Use KQL to analyze performance
telemetry and troubleshoot microservice connectivity failures. Inspect logs and events when troubleshooting
AKS and ACA.
Question 1Choose 1
You need to deploy a batch embedding workload according to the planned application architecture.
What should you use?
Correct answer:
A. YAML-formatted files
Explanation
When deploying a batch embedding workload to a containerized environment (specifically Azure Kubernetes Service, as implied by the other options), you use YAML-formatted files.
YAML (YAML Ain't Markup Language) is the industry-standard declarative language for Kubernetes. To deploy a batch workload, you create a YAML manifest file (such as a Kubernetes Job or CronJob) that defines the desired state of the application—including the container image to use, the number of completions/parallelism, resource requests/limits (e.g., GPU or high-memory nodes required for embeddings), and environment variables (like API keys or endpoint URLs). You then apply this file to the cluster, allowing Kubernetes to manage the batch execution lifecycle.
Why the Other Options Are Incorrect
- B. kubectl run and create commands: While kubectl create -f file.yaml is the command used to deploy the YAML, the kubectl run command is primarily imperative and designed for creating simple, single-container Pods or Deployments. It lacks the robust configuration capabilities needed for complex batch jobs with specific restart policies, parallelism, and multi-container setups.
- C. XML-formatted files: XML is not supported by Kubernetes for manifest configuration. Kubernetes exclusively uses YAML or JSON.
- D. az aks commands: The az aks commands are used to manage the Azure Kubernetes Service cluster infrastructure itself (e.g., creating the cluster, scaling node pools, or getting credentials). They are not used to deploy individual application workloads or batch jobs onto the cluster.
References
- Microsoft Learn:Run a batch job using a Kubernetes Job (Explains how to use YAML manifests for batch workloads).
Question 2Choose 1
You need to improve throughput for concurrent application requests to PostgreSQL.
What should you implement?
Correct answer:
A. Implement connection pooling.
Explanation
When an application experiences high volumes of concurrent requests, it can overwhelm a relational database like Azure Database for PostgreSQL. Each new connection consumes significant memory and CPU overhead on the database server to establish and maintain.
Implementing connection pooling (using tools like PgBouncer, which is built into Azure Database for PostgreSQL Flexible Server) solves this by maintaining a pool of active, reusable database connections. Instead of opening and closing a connection for every application request, the application checks out an existing connection from the pool, uses it, and returns it immediately. This drastically reduces the overhead on the database, allowing it to process a much higher throughput of concurrent application requests.
Why the Other Options Are Incorrect
B. Increase shared_buffers:shared_buffers controls the amount of memory dedicated to caching data. While increasing it can improve read performance (reducing disk I/O), it does not directly address the bottleneck of establishing and managing hundreds or thousands of concurrent connections.
C. Enable read replicas: Read replicas are excellent for scaling out read-heavy workloads by offloading queries to secondary servers. However, they do not solve the connection overhead problem on the primary server for general application requests (especially write operations, which must go to the primary).
D. Increase max_connections: While this allows more concurrent connections, it is generally an anti-pattern. Setting max_connections too high requires massive amounts of RAM (as each connection consumes memory) and can lead to severe CPU context-switching overhead, which ultimately decreases throughput and can crash the database.
References Microsoft Learn:Connection pooling in Azure Database for PostgreSQL - Flexible Server (Explains how built-in PgBouncer helps manage concurrency).
That's the last free question in Topic 2, Fabrikam Inc
You've seen the free 30% of this topic (2 of 8 questions). Get complete access for every question, explanation and the timed mock exam.
Get exam-ready with a timed AI 200 Developing AI Cloud Solutions on Azure mock exam designed to match the official exam's question format, question count, and time limit.