QuizzesProduction Patterns — Health Checks, Restart Policies & Logging — Concept Check
intermediate
docker

Production Patterns — Health Checks, Restart Policies & Logging — Concept Check

Questions on Production Patterns — Health Checks, Restart Policies & Logging. Running containers in production requires health checks, restart policies, log management, and resource limits to ensure reliability, observability, and efficient resource use.

7 minutes 7 questions Pass at 70%
Time Limit
7 minutes - timer starts when you begin
Change Answers Freely
Revisit and change any answer before submitting
Full Review After Submit
Correct answers and explanations shown for every question
Auto-submit on timeout
Quiz submits automatically when time runs out

Questions in this quiz

7 questions on Production Patterns — Health Checks, Restart Policies & Logging — Concept Check. Work through them here, then start the quiz to answer them and see your score.

  1. 1.A container using the default logging driver is removed. What happens to its logs?

    • ALogs are archived in the Docker daemon
    • BLogs are lost after container removal
    • CLogs are automatically transferred to a central system
    • DLogs are stored in a backup file
  2. 2.A container restarts repeatedly with the 'always' policy. What might be the cause?

    • AThe container has no health check defined
    • BThe application inside the container is crashing
    • CThe container is manually stopped
    • DThe Docker daemon is misconfigured
  3. 3.What does the HEALTHCHECK command do when the specified URL is unreachable?

    • AMarks the container as unhealthy
    • BRemoves the container from the network
    • CStops the container immediately
    • DIgnores the failure and retries
  4. 4.A container is set with 'unless-stopped' restart policy. What happens during a Docker daemon restart?

    • AContainer restarts automatically
    • BContainer remains stopped
    • CContainer logs are cleared
    • DContainer is removed
  5. 5.Why might a service appear 'healthy' in `docker ps` but still have issues?

    • AThe Docker daemon is outdated
    • BThe service lacks a restart policy
    • CHEALTHCHECK might not cover all failure modes
    • DThe container is using too much memory
  6. 6.In a Kubernetes environment, how are logs typically managed?

    • AUsing a sidecar pattern with a log collector
    • BAutomatically sent to Docker Hub
    • CStored locally on each node
    • DArchived in the container's filesystem
  7. 7.What happens if a HEALTHCHECK command exceeds the specified timeout?

    • AThe container is stopped
    • BThe timeout is ignored
    • CThe check is retried immediately
    • DThe container is marked as unhealthy