云原生-应用开发的最佳实践原则,12-Factor
Posted 假程序员樱木
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了云原生-应用开发的最佳实践原则,12-Factor相关的知识,希望对你有一定的参考价值。
介绍
12-Factors 经常被翻译为12因素,符合12因素的应用则称为12因素应用。
Heroku(HeroKu于2009年推出公有云PaaS)于2012年提出12因素,告诉开发者如何利用云平台提供的便利来开发更具可靠性和扩展性、更加易于维护的云原生应用。
为此还有一个专门的12因素网站:https://12factor.net/ ,以及这个网站内容的中文版本:
https://12factor.net/zh_cn/ 。
具体内容
Factor |
描述 |
Codebase |
One codebase tracked in revision control, many deploys |
Dependencies |
Explicitly declare and isolate dependencies |
Config |
Store config in the environment |
Backing services |
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 |
Port binding |
Export services via port binding |
Concurrency |
Scale out via the process model |
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 |
Run admin/management tasks as one-off processes |
12因素在云原生架构中的体现:
以上是关于云原生-应用开发的最佳实践原则,12-Factor的主要内容,如果未能解决你的问题,请参考以下文章