• 微服务基础设施选型


    微服务基础设施架构

    全貌

    在这里插入图片描述

    优先级

    在这里插入图片描述

    微服务框架模式

    核心

    在这里插入图片描述

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

    模式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

    如何选择开源微服务框架

    在这里插入图片描述

  • 相关阅读:
    遇到Bug漏测,不能总想着甩锅吧
    WebGL笔记:使用鼠标绘制多个线条应用及绘制动感线性星座
    Java编程学习-数据库连接池
    ISCTF
    【Jenkins】pipeline流水线
    es6(三)—— set(集合) 和map的使用
    2023年【广东省安全员A证第四批(主要负责人)】考试技巧及广东省安全员A证第四批(主要负责人)模拟试题
    推荐系统常见算法分类
    2024年,提升Windows开发和使用体验的实践经验 - RIME输入法
    雷达LD2450的工作原理图
  • 原文地址:https://blog.csdn.net/lee_nacl/article/details/127899907