当前位置:网站首页>【译】十二因子应用(四)
【译】十二因子应用(四)
2022-06-29 19:57:00 【全栈程序员站长】
IV 后端服务
将后端服务视为可拔插的资源
后端服务是一种在应用在网络上正常运行时消费的任意一种服务。包括数据库(如MySQL或CouchDB),消息/队列系统(如RabbitMQ或Beantalkd),发邮件的SMTP服务(如Postfix),缓存系统(如Memcached)。
数据库这种后端服务传统上与应用运行时部署一起呗同样的系统管理员管理。除了这些本地管理的服务,应用也会有一些被第三方管理的服务。如SMTP服务(Postmark),度量数据收集服务(如New Relic或Loggly),二进制存储服务(如Amazon S3),甚至API存取服务(Twitter,GoogleMap,或Last.fm)。
12因子应用的代码对待这些本地和第三方服务来说没有差别。应用端,都是可拔插的资源,通过URL或其他配置好的定位/鉴权服务。一份12因子应用的部署可以不经过任何代码修改将本地MySQL数据库替换成第三方的服务(如Amazon RDS)。同样的,本地SMTP服务可以被替换成第三方SMTP服务(如Postmark)而不需要改动代码。在这两个case,只有处理资源的配置文件需要变动。
每一个后端服务服务都是一个资源。如MySQL是一个资源,两个MySQL数据库(在应用层做sharding)就是两个独立的资源。12因子应用将这些数据库看做可拔插资源,在部署时是松耦合的。
资源可以按意愿在部署时进行拔插。如,如果应用的数据库由于硬件问题出现故障,应用管理员可以快速从一个最近的备份中进行恢复。当前的生产库可以被卸载,新数据库被挂载上 – 不需要代码变动。
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/101288.html原文链接:https://javaforall.cn
边栏推荐
- MBA-day19 如果p则q矛盾关系p 且非q
- 画虎国手孟祥顺数字藏品限量发售,随赠虎年茅台
- Common knowledge of ECS security settings
- 【摸鱼神器】UI库秒变低代码工具——表单篇(一)设计
- Automatically obtain local connection and network address modification
- How to use filters in jfinal to monitor Druid for SQL execution?
- data link layer
- KDD 2022 | characterization alignment and uniformity are considered in collaborative filtering
- How to install and use computer SSD hard disk
- Foxit software was invited to appear at the 2022 advanced manufacturing digital intelligence development forum
猜你喜欢

Technical methodology of new AI engine under the data infrastructure upgrade window

Shell bash script note: there must be no other irrelevant characters after the escape character \ at the end of a single line (multi line command)

JVM (4) bytecode technology + runtime optimization

KDD 2022 | 协同过滤中考虑表征对齐和均匀性

罗清启:高端家电已成红海?卡萨帝率先破局

JVM (4) Bytecode Technology + Runtime Optimization

npm ERR! fatal: early EOF npm ERR! fatal: index-pack failed
MSYQL, redis, mongodb visual monitoring tool grafana

Luoqingqi: has high-end household appliances become a red sea? Casati took the lead in breaking the game

Kdd 2022 | prise en compte de l'alignement et de l'uniformité des représentations dans le Filtrage collaboratif
随机推荐
As the "only" privacy computing provider, insight technology is the "first" to settle in the Yangtze River Delta data element circulation service platform
Luoqingqi: has high-end household appliances become a red sea? Casati took the lead in breaking the game
KDD 2022 | 協同過濾中考慮錶征對齊和均勻性
Several policies of Shenzhen Futian District to support investment attraction in 2022
Classic illustration of K-line diagram (Collection Edition)
Koa source code analysis
Measures to support the development of advanced manufacturing industry in Futian District of Shenzhen in 2022
@Sneakythlows annotation
A keepalived high availability accident made me learn it again!
Physical verification LVS process and Technology (Part I)
Flume configuration 3 - interceptor filtering
Flume configuration 2 - ganglia for monitoring
雲服務器的安全設置常識
Dynamics crm: among locally deployed servers, sandbox, unzip, VSS, asynchronous and monitor services
Finally, Amazon~
ASP.Net Core创建Razor页面上传多个文件(缓冲方式)(续)
[USB flash disk test] in order to transfer the data at the bottom of the pressure box, I bought a 2T USB flash disk, and the test result is only 47g~
Common knowledge of ECS security settings
Flume配置3——拦截器过滤
Canonical engineers are trying to solve the performance problem of Firefox snap