12-Factor App Methodology Best Practices

Best Practices for 12-Factor App Methodology

Question

Which two statements are considered best practices according to the 12-factor app methodology for application design? (Choose two.)

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D. E.

AD.

The 12-factor app methodology is a set of best practices for building modern, scalable, and maintainable software applications. The methodology covers various aspects of application design, including codebase, dependencies, configuration, backing services, and logging.

Based on this methodology, two statements that are considered best practices for application design are:

C. Application log streams are sent to log indexing and analysis systems.

According to the 12-factor app methodology, applications should treat logs as event streams and should not write to individual log files. Instead, applications should stream their logs to a central location, such as a log indexing and analysis system, where they can be aggregated, searched, and analyzed. This approach enables better visibility into application behavior and simplifies troubleshooting.

A. Application code writes its event stream to stdout.

According to the 12-factor app methodology, applications should be designed to run as stateless processes that receive their configuration, environment, and other information as input. The output of the application should be written to stdout, which can then be captured by the process manager or container orchestrator and redirected to the appropriate destination, such as a log file or a messaging system. This approach enables better decoupling of application components and makes it easier to scale and manage the application.

The other answer choices are not considered best practices according to the 12-factor app methodology:

B. Application log streams are archived in multiple replicated databases.

The 12-factor app methodology does not recommend storing logs in databases, as this can lead to performance and scalability issues. Instead, logs should be treated as event streams and should be streamed to a central location.

D. Application code writes its event stream to specific log files.

As mentioned earlier, the 12-factor app methodology recommends streaming logs to a central location instead of writing to individual log files.

E. Log files are aggregated into a single file on individual nodes.

According to the 12-factor app methodology, logs should be treated as event streams and should be streamed to a central location, rather than being aggregated into a single file on individual nodes. This approach enables better visibility and troubleshooting of the application.