Chapter 2- 微服务解决方案之 Spring Cloud

1. 什么是  Spring cloud?

Spring Cloud 提供一些可以让开发者快速构建微服务的工具,比如配置管理、服务发现、熔断、智能路由等,这些服务可以在任何分布式环境下很好地工作。Spring Cloud 主要致力于解决如下问题:

  • Distributed/versioned configuration: 分布式版本化配置
  • Service registration and discovery: 服务注册和发现
  • Routing: 服务路由
  • Service-to-service calls, 服务调用
  • Load balancing:负载均衡
  • Circuit Breakers:断路器
  • Global locks:全居锁
  • Leadership election and cluster state: Leader 选举和集群状态
  • Distributed messaging: 分布式消息

Spring Cloud 其实就是一套规范,而 Spring Cloud Netflix, Spring Cloud Consul, Spring Cloud Alibaba 才是 Spring Cloud 规范的实现。

2. Spring Cloud Netflix

Spring Cloud Netflix 主要是微服务架构下为服务治理提供解决方案,包含以下组件:

  • Eureka: 服务注册与发现
  • Zuul: 服务网关
  • Ribbon:负载均衡
  • Feign:远程服务的客户端代理
  • Hystrix: 断路器,提供服务熔断和限流功能
  • Hystrix Dashboard: 监控面板
  • Turbine:将各个服务实例的 Hystrix  监控信息进行统一聚合

3. Spring Cloud Alibaba

  • Sentiel:流量控制和服务降级
  • Nacos:服务注册和发信啊
  • Nacos:分布式配置中心
  • RocketMQ:消息驱动
  • Seate:分布式事事务
  • Dubbo:RPC通信
  • OSS:阿里云对象存储(收费的云服务)

posted on 2022-01-30 17:23  猪伯  阅读(56)  评论(0编辑  收藏  举报

导航