微服务基础设施选型

微服务基础设施架构

全貌

在这里插入图片描述

优先级

在这里插入图片描述

微服务框架模式

核心

在这里插入图片描述

服务注册、服务发现、服务路由

模式1-嵌入SDK

在这里插入图片描述

优点

  1. 架构简单,天然支持高性能、高可用
  2. 维护简答,无需维护独立的Proxy节点

缺点

  1. 应用侵入,需要集成SDK,并联动升级
  2. 多语言重复开发SDK

模式2-反向代理式

在这里插入图片描述

优点

  1. 应用无侵入
  2. 天然支持多语言

缺点

  1. Service Proxy需要通过集群来做高性能、高可用
  2. 维护复杂,需要维护Service Proxy集群

模式3-网络代理式(Service Mesh)

在这里插入图片描述

优点

  1. 应用无侵入
  2. 天然支持多语言
  3. 天然支持架构高性能、高可用

缺点

  1. 维护复杂,需要维护每台服务器上的Service Proxy
  2. 单台服务器的Service Mesh是单点
  3. 全链路请求性能会下降

3种模式对比

嵌入SDK反向代理网络代理
多语言每个语言都需要开发SDK天然支持多语言天然支持多语言
应用侵入需要集成SDK
可维护性无需额外维护工作维护Proxy服务器集群维护每台机器上的Proxy节点,数量非常多
高性能天然支持需要通过Proxy集群来实现整体架构是高性能的,但全链路请求性能会下降
高可用天然支持需要通过Proxy集群来实现整体架构是高可用,单台服务器上的Proxy是单点
适应场景团队技术栈统一为某个单语言团队技术栈多语言,服务集群规模不大(1000服务器以内)团队技术栈多语言,服务集群规模超大(1000服务器以上)

常见微服务框架选择

嵌入SDK

Dubbo

在这里插入图片描述

Apache Dubbo是一款高性能、轻量级的开源Java服务框架,提供了6大核心能力:

  1. 面向接口代理的高性能RPC调用
  2. 智能容错和负载均衡
  3. 服务自动注册和发现
  4. 高度可扩展能力
  5. 运行期流量调度
  6. 可视化的服务治理和运维

Spring Cloud

在这里插入图片描述

Spring Cloud provides tools for (Java) developers to quickly build some of the common patterns in distributed systems:

  1. Distributed/versioned configuration
  2. Service registration and discovery
  3. Routing
  4. Service-to-service calls
  5. Load balancing
  6. Circuit Breakers
  7. Global locks
  8. Leadership election and cluster state
  9. Distributed messaging

反向代理式

APISIX

在这里插入图片描述

Apache APISIX is a dynamic, real-time, high-performance API gateway. Based on the Nginx library and etcd

APISIX provides rich traffic management features such as load balancing, dynamic upstream, canary release, circuit breaking,authentication, observability, and more

You can use Apache APISIX to handle traditional north-south traffic, as well as east-west traffic between services. It can also be used as a k8s ingress controller

网络代理式(Service Mesh)

Istio

在这里插入图片描述

Istio makes it easy to create a network of deployed services with load balancing, service-to-service authentication, monitoring, and more, with few or no code changes in service code

  1. Automatic load
  2. Fine-grained control of traffic behavior with rich routing rules,retries, failovers, and fault injection
  3. A pluggable policy layer and configuration API supporting access controls, rate limits and quotas
  4. Automatic metrics, logs, and traces for all traffic within a cluster,including cluster ingress and egress
  5. Secure service-to-service communication in a cluster with strong identity-based authentication and authorization

如何选择开源微服务框架

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值