Quizzes12-Factor App Principles — Concept Check
intermediate
microservices

12-Factor App Principles — Concept Check

Questions on 12-Factor App Principles. The 12-Factor methodology (codebase, dependencies, config, backing services, build/release/run, processes, port binding, concurrency, disposability, dev/prod parity, logs, admin) defines best practices for cloud-native services.

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 12-Factor App Principles — Concept Check. Work through them here, then start the quiz to answer them and see your score.

  1. 1.A developer is setting up a new microservice and wants to ensure it follows the 12-Factor App principles. Which of the following should they do to handle configuration?

    • ARely on default configuration values provided by the framework.
    • BHardcode configuration values in the source code for simplicity.
    • CStore configuration in environment variables and inject them using Spring Boot's @Value.
    • DUse a separate configuration file for each environment and commit them to version control.
  2. 2.During a code review, you notice a colleague has hardcoded database credentials in the application source code. What is a potential issue with this approach according to the 12-Factor App principles?

    • AIt allows for easier debugging in production environments.
    • BIt violates the principle of storing config in environment variables, risking security and flexibility.
    • CIt ensures faster access to credentials, improving performance.
    • DIt simplifies the codebase, making it easier to manage.
  3. 3.A service is experiencing slow startup times. Which 12-Factor App principle might be violated if the service takes too long to start or stop?

    • AConcurrency, which focuses on scaling processes.
    • BDisposability, which requires fast startup and graceful shutdown.
    • CBuild, Release, Run, which separates these stages.
    • DPort Binding, which deals with exposing services via ports.
  4. 4.An engineer suggests using system-wide packages for dependencies to reduce duplication across services. Why is this contrary to the 12-Factor App principles?

    • AUsing system-wide packages simplifies the deployment process.
    • BIt aligns with the principle of having a single codebase per service.
    • CSystem-wide packages improve performance by reducing memory usage.
    • DDependencies should be explicitly declared per service to avoid conflicts and ensure consistency.
  5. 5.A team is using different database systems in development and production environments. Which principle are they likely violating?

    • AProcesses, which requires statelessness.
    • BConcurrency, which focuses on horizontal scaling.
    • CDev/Prod Parity, which requires similar environments to avoid surprises.
    • DAdmin Processes, which deals with management tasks.
  6. 6.A microservice is deployed with an embedded Tomcat server. Which 12-Factor App principle does this implementation support?

    • AConcurrency, which focuses on scaling processes.
    • BBacking Services, which treats external services as attached resources.
    • CDisposability, which requires fast startup and shutdown.
    • DPort Binding, which requires services to expose their own ports.
  7. 7.Which of the following is a key aspect of the 'Build, Release, Run' principle in the 12-Factor App methodology?

    • ARunning code should be modified directly in production for quick fixes.
    • BBuild and release stages can be combined for efficiency.
    • CA release is immutable and should not change without a new release.
    • DThe build stage includes environment-specific configurations.