Spring Cloud 系列之一:Spring Cloud 介绍

Spring Cloud 系列之一:Spring Cloud 介绍

随着 Spring 生态圈的不断发展与完善,Spring Cloud 现在已经完全是企业级微服务架构的集大成者,云计算行业的最佳实践,提及服微服,必然会提到的一个框架(组)。如果你想从头开始一个微服务云应用,想拥有一整套完整的实施方案,那么,就目前看来,Spring Boot + Spring Cloud 是最佳(甚至可以说是唯一)的选择。另一个国内用得比较多的微服务框架模型是来自 Alibaba 开源的 dubbo ,但相比完整的 Spring boot + cloud 生态圈来说,dubbo 在生态上还不是很完善,需要有很多的自定制,需要有较高的定制能力。

在官方的介绍中,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.

从它的介绍中我们也可以看出,整个架构生态包含了几乎微服务和云服务的各个方面,从应用到监控,从LB到容灾。整体架构包含了大大小小十几个主要的子项目,几乎和所有的知名第三方云平台都有适配合作,其中 Netflix 系列也对 Spring Cloud 生态圈作了很好的扩展与融合。以下是主要的子项目及其介绍:


Spring Cloud Config
配置管理工具包,让你可以把配置放到远程服务器,集中化管理集群配置,目前支持本地存储、Git以及Subversion。

Spring Cloud Bus
事件、消息总线,用于在集群(例如,配置变化事件)中传播状态变化,可与Spring Cloud Config联合实现热部署。

Eureka(来自 Netflix)
云端服务发现,一个基于 REST 的服务,用于定位服务,以实现云端中间层服务发现和故障转移。

Hystrix(来自 Netflix)
熔断器,容错管理工具,旨在通过熔断机制控制服务和第三方库的节点,从而对延迟和故障提供更强大的容错能力。

Zuul(来自 Netflix)
Zuul 是在云平台上提供动态路由,监控,弹性,安全等边缘服务的框架。Zuul 相当于是设备和 Netflix 流应用的 Web 网站后端所有请求的前门。

Archaius(来自 Netflix)
配置管理API,包含一系列配置管理API,提供动态类型化属性、线程安全配置操作、轮询框架、回调机制等功能。

Consul(来自HashiCorp)
封装了Consul操作,consul是一个服务发现与配置工具,与Docker容器可以无缝集成。

Spring Cloud for Cloud Foundry(来自Pivotal)
通过Oauth2协议绑定服务到CloudFoundry,CloudFoundry是VMware推出的开源PaaS云平台。

Spring Cloud Sleuth
日志收集工具包,封装了Dapper和log-based追踪以及Zipkin和HTrace操作,为SpringCloud应用实现了一种分布式追踪解决方案。

Spring Cloud Data Flow(来自Pivotal)
大数据操作工具,作为Spring XD的替代产品,它是一个混合计算模型,结合了流数据与批量数据的处理方式。

Spring Cloud Security
基于spring security的安全工具包,为你的应用程序添加安全控制。

Spring Cloud Zookeeper
操作Zookeeper的工具包,用于使用zookeeper方式的服务发现和配置管理。

Spring Cloud Stream
数据流操作开发包,封装了与Redis,Rabbit、Kafka等发送接收消息。

Spring Cloud CLI
基于 Spring Boot CLI,可以让你以命令行方式快速建立云组件。

Ribbon(来自 Netflix)
提供云端负载均衡,有多种负载均衡策略可供选择,可配合服务发现和断路器使用。

Turbine(来自 Netflix)
Turbine是聚合服务器发送事件流数据的一个工具,用来监控集群下hystrix的metrics情况。

Feign(来自OpenFeign)
Feign是一种声明式、模板化的HTTP客户端。

Spring Cloud Task
提供云端计划任务管理、任务调度。

Spring Cloud Connectors
便于云端应用程序在各种PaaS平台连接到后端,如:数据库和消息代理服务。

Spring Cloud Cluster
提供Leadership选举,如:Zookeeper, Redis, Hazelcast, Consul等常见状态模式的抽象和实现。

Spring Cloud Starters(来自Pivotal)
Spring Boot式的启动项目,为Spring Cloud提供开箱即用的依赖管理。

你可能感兴趣的:(Spring Cloud 系列之一:Spring Cloud 介绍)