1、从官方文档了解。
spring-cloud
Spring Cloud provides tools for developers to quickly build some of the common patterns in distributed systems (e.g. configuration management, service discovery, circuit breakers, intelligent routing, micro-proxy, control bus, one-time tokens, global locks, leadership election, distributed sessions, cluster state). Coordination of distributed systems leads to boiler plate patterns, and using Spring Cloud developers can quickly stand up services and applications that implement those patterns. They will work well in any distributed environment, including the developer’s own laptop, bare metal data centres, and managed platforms such as Cloud Foundry.
翻译:
springcloud 为开发者提供了快速部署通用分布式模式工具。(比如,配置管理、服务发现、循环心跳、智能路由、迷你代理、控制总线、一次性tokens、全局时钟、领导者选举、分布式session、集群状态)写调试分布式系统统治样式模版 和使用cloud 的开发者能快速建立服务和实现这些模式的程序。它们能很好工作在分布式环境,包括开发者自己笔记本,装有虚拟机子的数据中心 和像cloud foundry管理平台.
注解:
1 A bare metal environment is a computer system or network in which a virtual machine is installed directly on hardware rather than within the host operating system (OS). The term “bare metal” refers to a hard disk, the usual medium on which a computer’s OS is installed.
一共21个组件,详见官网。
我们关注“通用分布式模式”这个关键字,建立一个分布式系统,一般情况是ms模式(master/slaves),需要考虑如下几点:
1. master 对服务的生命管理(服务的注册、服务的开始、服务的停止)。
2. 对这个master中已经注册服务的进行配置,可以在master 进行同一的配置。
3. 智能路由(未解)
4. 状态管理:
- 包括 master 和slaves之间的心跳。
- 集群的状态
- 全局的时钟
- 分布式session
5. master 高可用性(领导者选举模式,就像zookeeper)