Table of contents
No headings in the article.
Every DevOps engineer should know about 12-factor apps.
So what is 12-factor app?
The 12 Factor App methodology is a pattern to design scalable application architecture.
What is the advantage?
Twelve-factor design helps you decouple components of the app, so that each component can be replaced easily, or scaled up or down seamlessly.
Because the factors are independent of any programming language or software stack, twelve-factor design can be applied to a wide variety of apps.
Here is the summary of a 12 factor app.
Codebase: One codebase tracked in revision control, many deploys. There is only one codebase per app, but there will be many deploys of the app.
Dependencies: Always manage the app dependencies externally using dependency management configs & tools
Config: The twelve-factor app stores config in environment variables (often shortened to env vars or env). Env vars are easy to change between deploys without changing any code.
Backing services: A backing service is any service the app consumes over the network as part of its normal operation. Treat backing services as attached resources
Build, release, run: Strictly separate build and run stages
Processes: Execute the app as one or more stateless processes. Twelve-factor processes are stateless and share-nothing. Any data that needs to persist must be stored in a stateful backing service, typically a database.
Port binding: Export services via port binding
Concurrency: The principle of Concurrency recommends organizing processes according to their purpose and then separating those processes so that they can be scaled up and down according to need.
Disposability: Maximize robustness with fast startup and graceful shutdown
Dev/prod parity: Keep development, staging, and production as similar as possible
Logs: Treat logs as event streams
Admin processes: the twelve-factor methodology strongly suggests keeping such admin scripts together with the application codebase. For example, schema migration script or a DB backup script.
Hope this guide gives you an understanding of 12-factor app.
Let me know your thoughts in the comment section ๐ And if you haven't yet, make sure to follow me on below handles:
๐ connect with me on LinkedIn ๐ค connect with me on Twitter ๐ฑโ๐ป follow me on github โ๏ธ Do Checkout my blogs
Like, share and follow me ๐ for more content.