𝗪𝗵𝘆 𝗶𝘀 𝘁𝗵𝗲 𝗧𝘄𝗲𝗹𝘃𝗲-𝗙𝗮𝗰𝘁𝗼𝗿 𝗔𝗽𝗽 𝗶𝗺𝗽𝗼𝗿𝘁𝗮𝗻𝘁?
It explains many well-tested architectural patterns and best practices that can be applied to software-as-a-service (SaaS) apps. These recommended practices allow apps to be developed with resilience and portability for online deployment.
The Twelve Factors:
𝗜. 𝗖𝗼𝗱𝗲𝗯𝗮𝘀𝗲
One codebase tracked in revision control, many deploys
𝗜𝗜. 𝗗𝗲𝗽𝗲𝗻𝗱𝗲𝗻𝗰𝗶𝗲𝘀
Explicitly declare and isolate dependencies
𝗜𝗜𝗜. 𝗖𝗼𝗻𝗳𝗶𝗴
Store config in the environment
𝗜𝗩. 𝗕𝗮𝗰𝗸𝗶𝗻𝗴 𝘀𝗲𝗿𝘃𝗶𝗰𝗲𝘀
Treat backing services as attached resources
𝗩. 𝗕𝘂𝗶𝗹𝗱, 𝗿𝗲𝗹𝗲𝗮𝘀𝗲, 𝗿𝘂𝗻
Strictly separate build and run stages
𝗩𝗜. 𝗣𝗿𝗼𝗰𝗲𝘀𝘀𝗲𝘀
Execute the app as one or more stateless processes
𝗩𝗜𝗜. 𝗣𝗼𝗿𝘁 𝗯𝗶𝗻𝗱𝗶𝗻𝗴
Export services via port binding
𝗩𝗜𝗜𝗜. 𝗖𝗼𝗻𝗰𝘂𝗿𝗿𝗲𝗻𝗰𝘆
Scale out via the process model
𝗜𝗫. 𝗗𝗶𝘀𝗽𝗼𝘀𝗮𝗯𝗶𝗹𝗶𝘁𝘆
Maximize robustness with fast startup and graceful shutdown
𝗫. 𝗗𝗲𝘃/𝗽𝗿𝗼𝗱 𝗽𝗮𝗿𝗶𝘁𝘆
Keep development, staging, and production as similar as possible
𝗫𝗜. 𝗟𝗼𝗴𝘀
Treat logs as event streams
𝗫𝗜𝗜. 𝗔𝗱𝗺𝗶𝗻 𝗽𝗿𝗼𝗰𝗲𝘀𝘀𝗲𝘀
Run admin/management tasks as one-off processes
Also, in the book "Beyond the 12 Factor App", Kevin Hoffman presents 𝗻𝗲𝘄 𝗴𝘂𝗶𝗱𝗲𝗹𝗶𝗻𝗲𝘀 that build on the original 12 factors but include elements such as telemetry and security:
1. One codebase, one application
2. API first
3. Dependency management
4. Design, build, release, and run
5. Configuration, credentials, and code
6. Logs
7. Disposability
8. Backing services
9. Environment parity
10. Administrative processes
12. Port binding
13. Stateless processes
14. Concurrency
15. Telemetry
16. Authentication and authorization
Image credits: DZone.
#technology #softwareengineering #programming #cloudcomputing #techworldwithmilan
10 things about System design you should learn
1. Caching
2. Sharding
3. load-balancing
4. replication
5. fault-tolerance
6. high-avaibility
7. Performance
8. scalability
9. Performance
10. Indexing
learn more on Design Guru - https://t.co/VuZLWnCdMw
Paul Graham最近的“How To Do Great Work”真是字字珠玑,要是我在十几岁的时候就能读到这样的东西就好了。推荐所有想要做点事情的人都读一下。
我看也有人做了人肉翻译的工作,中文译文也还不错。
https://t.co/66Ek1h9a4O
https://t.co/HvH2pnfpAt