主要内容来自于Microsoft Azure 2015年的文档
大型公司和企业都在通过构筑自己的私有云, 或者使用公有云服务来运行业务. 相对于传统的单机版业务层, 如何在分布式环境上构筑业务对服务端工程师形成新的挑战.
微软在2015年总结了Azure的用户案例遇到的问题和解决过程中形成的设计模式, 并分享出来
1. 高可用相关的模式 Availability Patterns
可用性意味着系统尽可能长时间的连续为客户服务.它可能被网络错误, 系统故障, 硬件故障, 自然灾害终端. 通常HA是用 Percent of Downtime来衡量的. 基于SLA, 云端业务需要能够实现一定的高可用设计.
- Health Endpoint Monitoring Pattern
- Queue-based Load Leveling Pattern
- Throttling Pattern
2. 数据治理
这一部分主要关注数据在云端和客户端的分部, 一致性. 根据业务选择对应的设计模式, 牺牲一部分特性来换取另外一部分增强特性.
- Cache-aside Pattern
- Command and Query Responsibility Segregation (CQRS) Pattern
- Event Sourcing Pattern
- Index Table Pattern
- Materialized View Pattern
- Sharding Pattern
- Static Content Hosting Pattern
- Valet Key Pattern
3. 设计和部署
好的设计模式使得部署后的业务能够有非常高的可重用性, 模块之间低耦合或者没有耦合, 对外呈现一致的接口和状态. 让业务程序的管理难度非常低
- Compute Resource Consolidation Pattern
- External Configuration Store Pattern
- Leader Election Pattern
- Runtime Reconfiguration Pattern
- Static Content Hosting Pattern
4. 消息传递和任务调度
在大型公司的应用中, 往往需要通过企业总线来传递消息, 而这些消息本质上就是后续工作的启动器, 消息系统和调度系统呈现一定的耦合性.
- Competing Consumers Pattern
- Pipes and Filters Pattern
- Priority Queue Pattern
- Scheduler Agent Supervisor Pattern
网友评论