The new and revised 15 factors
Table of Contents
12 factor
In the modern era, software is commonly delivered as a service: called web apps, or software-as-a-service. The twelve-factor app is a methodology for building software-as-a-service apps that:
- Use declarative formats for setup automation, to minimize time and cost for new developers joining the project;
- Have a clean contract with the underlying operating system, offering maximum portability between execution environments;
- Are suitable for deployment on modern cloud platforms, obviating the need for servers and systems administration;
- Minimize divergence between development and production, enabling continuous deployment for maximum agility;
- And can scale up without significant changes to tooling, architecture, or development practices.
The twelve-factor methodology can be applied to apps written in any programming language, and which use any combination of backing services (database, queue, memory cache, etc).
十二要素应用程序是一种构建软件即服务应用程序的方法:
- 使用声明性格式进行设置自动化,以最大限度地减少新开发人员加入项目的时间和成本;
- 与底层操作系统有清晰的契约,在执行环境之间提供最大的可移植性;
- 适合部署在现代云平台上,无需服务器和系统管理;
- 最大限度地减少开发和生产之间的差异,实现持续部署以实现最大灵活性;
- 并且可以在不对工具、架构或开发实践进行重大更改的情况下进行扩展。
十二因素方法可应用于用任何编程语言编写的应用程序,并使用任何组合的支持服务(数据库、队列、内存缓存等)
-
- Codebase
One codebase tracked in revision control, many deploys
- Codebase
-
- Dependencies
Explicitly declare and isolate dependencies
- Dependencies
-
- Config
Store config in the environment
- Config
-
- Backing services
Treat backing services as attached resources
- Backing services
-
- Build, release, run
Strictly separate build and run stages
- Build, release, run
-
- Processes
Execute the app as one or more stateless processes
- Processes
-
- Port binding
Export services via port binding
- Port binding
-
- Concurrency
Scale out via the process model
- Concurrency
-
- Disposability
Maximize robustness with fast startup and graceful shutdown
- Disposability
-
- Dev/prod parity
Keep development, staging, and production as similar as possible
- Dev/prod parity
-
- Logs
Treat logs as event streams
- Logs
-
- Admin processes
Run admin/management tasks as one-off processes
- Admin processes
15 factor
- One codebase, one application
- API first
- Dependency management
- Design, build, release, and run
- Configuration, credentials, and code
- Logs
- Disposability
- Backing services
- Environment parity
保持所有环境尽可能相似
- Administrative processes
- Port binding
应用是自包含的, 并通过端口绑定的方式导出服务
- Stateless processes
- Concurrency
- Telemetry
- Authentication and authorization
Reference
Comments |0|
Category: 似水流年