|
| 1 | +### YamlMime:ModuleUnit |
| 2 | +uid: learn.wwl.deploy-containers-azure-app-service.module-assessment |
| 3 | +title: Module assessment |
| 4 | +metadata: |
| 5 | + title: Module Assessment |
| 6 | + description: Module assessment |
| 7 | + ms.date: 01/13/2026 |
| 8 | + author: jeffkoms |
| 9 | + ms.author: jeffko |
| 10 | + ms.topic: unit |
| 11 | +azureSandbox: false |
| 12 | +durationInMinutes: 5 |
| 13 | +content: | |
| 14 | +quiz: |
| 15 | + questions: |
| 16 | + - content: "A container image is configured to listen on port 8000. After deploying to App Service, requests to the application return connection errors. What configuration change resolves this issue?" |
| 17 | + choices: |
| 18 | + - content: "Set the `WEBSITES_PORT` app setting to 8000." |
| 19 | + isCorrect: true |
| 20 | + explanation: "Correct. For custom containers, App Service can automatically route traffic when the container listens on port 80 or 8080. If the container listens on a different port, WEBSITES_PORT tells App Service which port to forward HTTP requests to inside the container." |
| 21 | + - content: "Modify the Dockerfile to use EXPOSE 80." |
| 22 | + isCorrect: false |
| 23 | + explanation: "Incorrect. EXPOSE doesn't change which port the application listens on. Your application still listens on the port it binds to at runtime, and App Service still needs to know which port to forward traffic to." |
| 24 | + - content: "Enable the HTTP/2 protocol in the platform settings." |
| 25 | + isCorrect: false |
| 26 | + explanation: "Incorrect. HTTP/2 affects the protocol used for client connections, not the port routing between App Service and the container." |
| 27 | + - content: "A document processing application writes output files during processing. After a container restart, the output files are missing. How do you configure App Service to persist these files?" |
| 28 | + choices: |
| 29 | + - content: "Set `WEBSITES_ENABLE_APP_SERVICE_STORAGE` to true and write files to the `/home` directory." |
| 30 | + isCorrect: true |
| 31 | + explanation: "Correct. This setting enables persistent storage for the /home directory. Files written to /home persist across container restarts and are shared across scaled instances." |
| 32 | + - content: "Configure a larger container image with more disk space." |
| 33 | + isCorrect: false |
| 34 | + explanation: "Incorrect. Container image size doesn't affect persistence. The container file system is ephemeral by default regardless of available space." |
| 35 | + - content: "Enable always-on to prevent container restarts." |
| 36 | + isCorrect: false |
| 37 | + explanation: "Incorrect. Always-on prevents the app from unloading due to inactivity, but containers still restart for deployments, scaling, and platform maintenance. Persistent storage is the correct solution." |
| 38 | + - content: "A production application requires different API endpoint URLs for staging and production deployment slots. Which configuration approach ensures the staging URL doesn't swap to production during a slot swap?" |
| 39 | + choices: |
| 40 | + - content: "Configure the API_ENDPOINT setting as a slot setting." |
| 41 | + isCorrect: true |
| 42 | + explanation: "Correct. Slot settings remain with their slot during swap operations. Marking API_ENDPOINT as a slot setting ensures each slot maintains its own endpoint configuration." |
| 43 | + - content: "Store the API endpoint in the container image for each environment." |
| 44 | + isCorrect: false |
| 45 | + explanation: "Incorrect. Hardcoding values in container images requires rebuilding for each environment and loses the benefits of environment-independent deployments." |
| 46 | + - content: "Use connection strings instead of app settings for the API endpoint." |
| 47 | + isCorrect: false |
| 48 | + explanation: "Incorrect. Connection strings swap between slots unless also marked as slot settings. Connection strings are intended for database connections, not API endpoints." |
| 49 | + - content: "A container starts successfully but health checks are failing, and App Service removes instances from the load balancer. The application has a `/healthz` endpoint that returns HTTP 200. What is the most likely cause?" |
| 50 | + choices: |
| 51 | + - content: "The health check path in App Service is configured differently than the application's health endpoint path." |
| 52 | + isCorrect: true |
| 53 | + explanation: "Correct. The health check path configured in App Service must match the exact path where your application responds to health requests. A mismatch like /health versus /healthz causes check failures." |
| 54 | + - content: "Health checks require HTTPS, but the container only serves HTTP." |
| 55 | + isCorrect: false |
| 56 | + explanation: "Incorrect. App Service sends health check requests over HTTP to the container. TLS termination happens at the load balancer, so the container receives HTTP requests." |
| 57 | + - content: "The container needs more memory to handle health check requests." |
| 58 | + isCorrect: false |
| 59 | + explanation: "Incorrect. Health check endpoints are typically lightweight. If the endpoint returns 200 successfully when tested directly, the issue is configuration rather than resources." |
| 60 | + - content: "A developer needs to verify that app settings are correctly injected into a running container. Which diagnostic tool provides this information?" |
| 61 | + choices: |
| 62 | + - content: "The Kudu diagnostic console Environment page." |
| 63 | + isCorrect: true |
| 64 | + explanation: "Correct. The SCM (Kudu) Environment view (or the /Env endpoint) shows the environment variables that App Service applies to the app, including app settings and system-provided variables." |
| 65 | + - content: "The log stream in the Azure portal." |
| 66 | + isCorrect: false |
| 67 | + explanation: "Incorrect. The log stream shows application output, not environment configuration. Environment variables don't appear in logs unless the application explicitly logs them." |
| 68 | + - content: "The App Service metrics dashboard." |
| 69 | + isCorrect: false |
| 70 | + explanation: "Incorrect. Metrics show performance data like CPU, memory, and request counts. Metrics don't include configuration or environment variable information." |
0 commit comments