首页 > 其他分享 >[Microservices] Twelve-Factor App Methology

[Microservices] Twelve-Factor App Methology

时间:2024-04-03 18:13:10浏览次数:53  
标签:Microservices code Deploy App Factor factor services app

Modern software development

  • Delivery as a service 
  • Centrally hosted and accessed through the internet
  • Web apps, software-as-a-service
  • Twelve-factor app methodology is suited for web apps

Code -> Deploy -> Operate

 

Factor 1: Codebase: Code factor

Track in a version control system(VCS)

  • Maintain one-to-one relationship between codebase and app
  • Deploy multiple instances of the app
  • Develop differnetversions of the codebase in each deploy

Factor 2: Dependencies:Code factor.

  • Assume an app is only as reliable as its least reliable dependency
  • Explicitly declare any dependencies

Factor 3: Config: Deploy factors

  • Keep everythng that varies between deploys such as credentials and backend service locations in config
  • Keep separate from the code
  • Store config in environment variables

Factor 4: Backend services: Deploy factor.

  • Do not distinguish between local and third-part services
  • Access all services by a URL and credentials so that they can be swapped without changing the code

Factor 5: Build, release , run: Code factor

  • Build: Transform a code base into an executable unit called a build
  • Release: Combine build with configuration so that it;s ready for execution
  • Run: Run the application

Factor 6: Processes: Deploy factor.

  • Should be stateless and share nothing
  • Do not share memory and filesystmes so persistent data stored in backend service
  • Store data centally

Factor 7: Port binding:Deploy factor.

  • Export services by port binding.
  • Export HTTP and other services.
  • Declare a web server library dependency
  • Become backend services for other apps

Factor 8: Concurrency: Operate factors.

  • Scale an application
  • Stateless processes can be spun up without createing dependencies on other processes

Factor 9: Disposability: Operate factors.

  • Require minimal process start time and graceful termination
  • Quickly deply code or config changes
  • Easily scale apps

Factor 10: Dev/prod parity: Code factor.

  • Minimize differences between development and production environments
  • Use same backend services across environments

Factor 11: Logs: Operate factors.

  • App should not concern itself with storing logs
  • Threat logs as an event stream
  • Execution environment captures, aggregates, and routes logs to their destination

Factor 12: Admin processes

  • Enable one-off app management processes
  • Run against a release, using same codebase and config
  • Part of application code

标签:Microservices,code,Deploy,App,Factor,factor,services,app
From: https://www.cnblogs.com/jbite9057/p/18113269

相关文章

  • UniApp 应用发布到苹果商店指南
     ......
  • 上传苹果IPA安装包的最佳实践:确保成功通过App Store审核
    目录引言摘要第二步:打开appuploader工具第二步:打开appuploader工具,第二步:打开appuploader工具第五步:交付应用程序,在iTunesConnect中查看应用程序总结引言在将应用程序上架到苹果应用商店之前,开发者需要学习如何上传ipa安装包。本文将介绍使用appuploader工具将ipa......
  • Android APP代码混淆技术解析与实战指南
    AndroidAPP加固是优化APK安全性的一种方法,常见的加固方式有混淆代码、加壳、数据加密、动态加载等。下面介绍一下AndroidAPP加固的具体实现方式。混淆代码使用ipaguard工具可以对代码进行混淆,使得反编译出来的代码很难阅读和理解,官网下载ipaguard即可。加固混淆......
  • 逐步指南:如何正确上传苹果IPA安装包至App Store
    目录引言摘要第二步:打开appuploader工具第二步:打开appuploader工具,第二步:打开appuploader工具第五步:交付应用程序,在iTunesConnect中查看应用程序总结引言在将应用程序上架到苹果应用商店之前,开发者需要学习如何上传ipa安装包。本文将介绍使用appuploader工具将ipa......
  • Apple Watch 运动记录自动停止 bug All In One
    AppleWatch运动记录自动停止bugAllInOneAppleWatchS6运动记录会自动停止bugquestionshttps://discussionschinese.apple.com/thread/253879237?sortBy=besthttps://discussionschinese.apple.com/thread/251948485?sortBy=bestdemosAppleWatchS6骑行记录,......
  • uniapp uni.showModal的content实现换行显示
    1.实现方法是:'\r\n'2.\r\n介绍\n软回车:在Windows中表示换行且回到下一行的最开始位置。相当于MacOS里的\r的效果。在Linux、unix中只表示换行,但不会回到下一行的开始位置。\r软空格:在Linux、unix中表示返回到当行的最开始位置。在MacOS中表示换行且返回到下一行的......
  • appium的使用--python
    介绍Appium是一个自动化开源工具,支持iOS、Android和Windows桌面平台上的原生、移动Web和混合应用的自动化。属于UI测试,用来模拟手工测试。优势(1)解放双手,但并不完全解放双手,需要手动辅助,并不是100%的自动化。(2)节省大量时间,可无人看管情况下运行,在流程结......
  • 【全开源】v7淘宝客APP源码-自营商城任务墙源码美团外卖CPS_博纳软云
    V7淘宝客APP源码-自营商城任务墙源码美团外卖CPS广告联,这一组合源码为商家提供了一个全方位的电商与外卖运营解决方案。V7淘宝客APP源码,作为电商领域的得力助手,为商家搭建了一个功能齐全、界面友好的在线购物平台。通过这一源码,商家可以轻松展示自己的商品,管理订单,与消费者进......
  • 【全开源】任务悬赏源码+接单系统+淘客(APP+H5+公众号)_博纳软云
    任务悬赏源码+接单系统+淘客(APP+H5+公众号):一站式解决方案,开启您的赚钱新纪元在当今这个数字化、信息化的时代,如何快速、高效地获取收益,成为众多用户关注的焦点。为此,我们隆重推出“任务悬赏源码+接单系统+淘客(APP+H5+公众号)”一站式解决方案,让您轻松开启赚钱新纪元。我们的任......
  • 【全开源】运营版JAVA商城小程序APP公众号源码-单商户PC源码多商户源码社交电商源码_
    运营版JAVA商城小程序APP公众号源码-单商户PC源码多商户源码社交电商源码:构建智慧商业新生态在数字化浪潮的推动下,智慧商业正成为新时代的发展趋势。为满足广大商家的需求,我们隆重推出运营版JAVA商城小程序APP公众号源码,涵盖单商户PC源码、多商户源码以及社交电商源码,助力您轻......