# Discovery
**Repository Path**: LevelCoder/Discovery
## Basic Information
- **Project Name**: Discovery
- **Description**: ☀️ Nepxion Discovery is a solution for Spring Cloud with blue green, gray, route, limitation, circuit breaker, degrade, isolation, tracing, dye, failover, active 蓝绿灰度发布、路由、限流、熔断、降级、隔离、追踪、流量染色、故障转移、多活
- **Primary Language**: Java
- **License**: Apache-2.0
- **Default Branch**: 6.x.x
- **Homepage**: http://www.nepxion.com
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 292
- **Created**: 2024-09-23
- **Last Updated**: 2024-09-23
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README

# Discovery【探索】云原生微服务解决方案
 [](https://github.com/Nepxion/Discovery/blob/6.x.x/LICENSE) [](https://search.maven.org/artifact/com.nepxion/discovery) [](http://www.javadoc.io/doc/com.nepxion/discovery-plugin-framework-starter) [](https://github.com/Nepxion/Discovery/actions) [](https://www.codacy.com/gh/Nepxion/Discovery/dashboard?utm_source=github.com&utm_medium=referral&utm_content=Nepxion/Discovery&utm_campaign=Badge_Grade) [](https://github.com/Nepxion/Discovery/stargazers) [](https://gitee.com/Nepxion/Discovery/stargazers)
[](https://github.com/Nepxion/Discovery/wiki) [](https://gitee.com/nepxion/Discovery/wikis/pages?sort_id=3993615&doc_id=1124387) [](https://nepxion.github.io/Discovery/docs/link-doc/discovery-ppt.html) [](https://nepxion.github.io/Discovery/) [](https://nepxion.github.io/DiscoveryPlatform) [](https://nepxion.github.io/DiscoveryDesktop) [](https://polaris-paas.github.io/polaris-wiki)
如果您觉得本框架具有一定的参考价值和借鉴意义,请帮忙在页面右上角 [**Star**]
## 简介
### 作者简介
- Nepxion开源社区创始人
- 2020年阿里巴巴中国云原生峰会出品人
- 2020年被Nacos和Spring Cloud Alibaba纳入相关开源项目
- 2021年阿里巴巴技术峰会上海站演讲嘉宾
- 2021年荣获陆奇博士主持的奇绩资本,进行风险投资的关注和调研
- 2021年入选Gitee最有价值开源项目
- 阿里巴巴官方书籍《Nacos架构与原理》作者之一
- Spring Cloud Alibaba Steering Committer、Nacos Group Member
- Spring Cloud Alibaba、Nacos、Sentinel、OpenTracing Committer & Contributor
### 商业合作
① Discovery系列
| 框架名称 | 框架版本 | 支持Spring Cloud版本 | 使用许可 |
| --- | --- | --- | --- |
| Discovery | 1.x.x ~ 6.x.x | Camden ~ Hoxton | 开源,永久免费 |
| DiscoveryX | 7.x.x + | 2020 + | 闭源,商业许可 |
② Polaris系列
Polaris为Discovery高级定制版,特色功能
- 基于Nepxion Discovery集成定制
- 多云、多活、多机房流量调配
- 跨云动态域名、跨环境适配
- DCN、DSU、SET单元化部署
- 组件灵活装配、配置对外屏蔽
- 极简低代码PaaS平台
| 框架名称 | 框架版本 | 支持Discovery版本 | 支持Spring Cloud版本 | 使用许可 |
| --- | --- | --- | --- | --- |
| Polaris | 1.x.x | 6.x.x | Finchley ~ Hoxton | 闭源,商业许可 |
| Polaris | 2.x.x | 7.x.x + | 2020 + | 闭源,商业许可 |
有商业版需求的企业和用户,请添加微信1394997,联系作者,洽谈合作事宜
### 入门资料
 Discovery【探索】企业级云原生微服务开源解决方案
① 快速入门
- [快速入门Github版](https://github.com/Nepxion/Discovery/wiki)
- [快速入门Gitee版](https://gitee.com/Nepxion/Discovery/wikis/pages)
② 解决方案
- [解决方案WIKI版](http://nepxion.com/discovery)
- [解决方案PPT版](https://nepxion.github.io/Discovery/docs/link-doc/discovery-ppt.html)
③ 最佳实践
- [最佳实践PPT版](https://nepxion.github.io/Discovery/docs/link-doc/discovery-ppt-1.html)
④ 平台桌面
- [平台界面WIKI版](http://nepxion.com/discovery-platform)
- [图形桌面WIKI版](http://nepxion.com/discovery-desktop)
⑤ 框架源码
- [框架源码Github版](https://github.com/Nepxion/Discovery)
- [框架源码Gitee版](https://gitee.com/Nepxion/Discovery)
⑥ 指南示例源码
- [指南示例源码Github版](https://github.com/Nepxion/DiscoveryGuide)
- [指南示例源码Gitee版](https://gitee.com/Nepxion/DiscoveryGuide)
⑦ 指南示例说明
- Spring Cloud Finchley ~ Hoxton版本
- [极简版指南示例](https://github.com/Nepxion/DiscoveryGuide/tree/6.x.x-simple),分支为6.x.x-simple
- [极简版域网关部署指南示例](https://github.com/Nepxion/DiscoveryGuide/tree/6.x.x-simple-domain-gateway),分支为6.x.x-simple-domain-gateway
- [极简版非域网关部署指南示例](https://github.com/Nepxion/DiscoveryGuide/tree/6.x.x-simple-non-domain-gateway),分支为6.x.x-simple-non-domain-gateway
- [集成版指南示例](https://github.com/Nepxion/DiscoveryGuide/tree/6.x.x),分支为6.x.x
- [高级版指南示例](https://github.com/Nepxion/DiscoveryGuide/tree/6.x.x-complex),分支为6.x.x-complex
- Spring Cloud 20xx版本
- [极简版指南示例](https://github.com/Nepxion/DiscoveryGuide/tree/master-simple),分支为master-simple
- [极简版本地化指南示例](https://github.com/Nepxion/DiscoveryGuide/tree/master-simple-native),分支为master-simple-native
- [集成版指南示例](https://github.com/Nepxion/DiscoveryGuide/tree/master),分支为master
 Polaris【北极星】企业级云原生微服务商业解决方案
① 解决方案
- [解决方案WIKI版](http://nepxion.com/polaris)
② 框架源码
- [框架源码Github版](https://github.com/polaris-paas/polaris-sdk)
- [框架源码Gitee版](https://gitee.com/polaris-paas/polaris-sdk)
③ 指南示例源码
- [指南示例源码Github版](https://github.com/polaris-paas/polaris-guide)
- [指南示例源码Gitee版](https://gitee.com/polaris-paas/polaris-guide)
④ 指南示例说明
- Spring Cloud Finchley ~ Hoxton版本
- [指南示例](https://github.com/polaris-paas/polaris-guide/tree/1.x.x),分支为1.x.x
- Spring Cloud 20xx版本
- [指南示例](https://github.com/polaris-paas/polaris-guide/tree/master),分支为master
### 功能概述
Discovery【探索】微服务框架,基于Spring Cloud & Spring Cloud Alibaba,Discovery服务注册发现、Ribbon & Spring Cloud LoadBalancer负载均衡、Feign & RestTemplate & WebClient调用、Spring Cloud Gateway & Zuul过滤等组件全方位增强的企业级微服务开源解决方案,更贴近企业级需求,更具有企业级的插件引入、开箱即用特征
① 微服务框架支持的技术栈,如下
- 支持阿里巴巴Spring Cloud Alibaba中间件生态圈
- 支持阿里巴巴Nacos、Eureka、Consul和Zookeeper四个服务注册发现中心
- 支持阿里巴巴Nacos、携程Apollo、Redis、Zookeeper、Consul和Etcd六个远程配置中心
- 支持阿里巴巴Sentinel、Hystrix和Resilience4J三个熔断限流降级权限中间件
- 支持OpenTracing和OpenTelemetry规范下的调用链中间件,Jaeger、SkyWalking和Zipkin等
- 支持Prometheus Micrometer和Spring Boot Admin两个指标中间件
- 支持Java Agent解决异步跨线程ThreadLocal上下文传递
- 支持Spring Spel解决蓝绿灰度参数的驱动逻辑
- 支持Spring Matcher解决元数据匹配的通配逻辑
- 支持Spring Cloud Gateway、Zuul网关和微服务三大模块的蓝绿灰度发布等一系列功能
- 支持和兼容Spring Cloud Edgware版、Finchley版、Greenwich版、Hoxton版和20xx版以及更高的Spring Cloud版本
- 支持和兼容Java8~Java17以及更高的SDK版本

② Discovery【探索】微服务框架支持的应用功能,如下
- 全链路蓝绿灰度发布
- 全链路版本、区域、 IP地址和端口匹配蓝绿发布
- 全链路版本、区域、 IP地址和端口权重灰度发布
- 全链路蓝 | 绿 | 兜底、蓝 | 兜底的蓝绿路由类型
- 全链路稳定、灰度的灰度路由类型
- 全链路网关、服务端到端混合蓝绿灰度发布
- 全链路单网关、域网关、非域网关部署
- 全链路条件驱动、非条件驱动
- 全链路前端触发后端蓝绿灰度发布
- 全局订阅式蓝绿灰度发布
- 全链路自定义网关、服务的过滤器、负载均衡策略类触发蓝绿灰度发布
- 全链路Header、Parameter、Cookie、域名、RPC Method等参数化规则策略驱动
- 全链路本地和远程、局部和全局无参数化规则策略驱动
- 全链路条件表达式、通配表达式支持
- 全链路内置Header,支持定时Job的服务调用蓝绿灰度发布
- 全链路手工编排、智能编排、无编排蓝绿灰度发布
- 全链路自动化测试
- 全链路自动化模拟流程测试
- 全链路自动化模拟流程本地测试
- 全链路自动化模拟流程云上测试
- 全链路自动化流量侦测测试
- 全链路自动化流量侦测本地测试
- 全链路自动化流量侦测云上测试
- 全链路流量管控对接DevOps运维平台
- 全链路多活单元化
- 全链路隔离路由
- 全链路组隔离路由
- 组负载均衡的消费端隔离
- 组Header传值的提供端隔离
- 全链路版本偏好路由
- 全链路区域调试路由
- 全链路环境隔离路由
- 全链路可用区亲和性隔离路由
- 全链路IP地址和端口隔离路由
- 全链路隔离准入
- 基于IP地址黑白名单注册准入
- 基于最大注册数限制注册准入
- 基于IP地址黑白名单发现准入
- 自定义注册发现准入
- 全链路故障转移
- 全链路版本故障转移
- 全链路区域故障转移
- 全链路环境故障转移
- 全链路可用区故障转移
- 全链路IP地址和端口故障转移
- 全链路服务无损下线,实时性的流量绝对无损
- 全局唯一ID屏蔽
- IP地址和端口屏蔽
- 异步场景下全链路蓝绿灰度发布
- 异步跨线程Agent插件
- Hystrix线程池隔离插件
- 网关动态路由
- 路由动态添加
- 路由动态修改
- 路由动态删除
- 路由动态批量更新
- 路由查询
- 路由动态变更后的事件通知
- 全链路服务限流熔断降级权限
- Sentinel基于服务名的防护
- Sentinel基于组的防护
- Sentinel基于版本的防护
- Sentinel基于区域的防护
- Sentinel基于环境的防护
- Sentinel基于可用区的防护
- Sentinel基于IP地址和端口的防护
- Sentinel自定义Header、Parameter、Cookie的防护
- Sentinel自定义业务参数的防护
- Sentinel自定义组合式的防护
- 全链路监控
- 蓝绿灰度埋点和熔断埋点的调用链监控
- 蓝绿灰度埋点和熔断埋点的日志监控
- 熔断埋点的指标监控
- 全链路蓝绿灰度发布编排建模和流量侦测
- 全链路蓝绿发布编排建模
- 全链路灰度发布编排建模
- 全链路蓝绿发布流量侦测
- 全链路灰度发布流量侦测
- 全链路蓝绿灰度发布混合流量侦测
- 全链路数据库和消息队列蓝绿发布
- 基于多DataSource的数据库蓝绿发布
- 基于多Queue的消息队列蓝绿发布
- 全链路服务侧注解
- 元数据流量染色
- 基于Git插件的元数据流量染色
- 基于服务名前缀的元数据流量染色
- 基于启动参数的元数据流量染色
- 基于配置文件的元数据流量染色
- 基于系统参数的元数据流量染色
- 基于POM版本号的元数据流量染色
- 扫描目录
- 自动扫描目录
- 手工扫描目录
- 注入扫描目录
- 规则策略推送
- 基于配置中心的规则策略订阅推送
- 基于Swagger和Rest的规则策略推送
- 基于平台端和桌面端的规则策略推送
- 统一配置订阅执行器

③ Discovery【探索】微服务框架支持的功能维度,如下
微服务框架支持组(Group)、版本(Version)、区域(Region)、环境(Env)、可用区(Zone)、IP地址和端口(Address)、全局唯一ID七大经典维度实施流量管控的方式,通过“并集”方式叠加作用在流量控制上。上述七个维度在功能上各有各的侧重点,如下表格主要讲述各自的区别
| 维度 | 概念 | 场景 | 功能侧重点 | 关键头
| --- | --- | --- | --- | --- |
| 组 | 服务实例的系统ID
系统逻辑分组 | 路由隔离 | ① 组负载均衡隔离
- 调用端和提供端的元数据group是否相同
② 组Header传值策略隔离
- Header(n-d-group)和提供端的元数据group是否相同
③ 不支持故障转移 | n-d-group |
| 版本 | 服务实例的版本
适用于生产环境 | 蓝绿灰度发布
路由转移
故障转移 | ① 版本条件匹配蓝绿发布
② 版本权重灰度发布
③ 版本偏好
- 非蓝绿灰度发布场景下,路由到相应版本的实例
- 稳定版本策略、指定版本策略
④ 版本故障转移
- 未找到相应版本的服务实例,路由到其它版本
- 负载均衡策略、稳定版本策略、指定版本策略 | n-d-version
n-d-version-weight
n-d-version-prefer
n-d-version-failover |
| 区域 | 服务实例的区域
适用于多活单元化
适用于多机房
适用于多环境 | 蓝绿灰度发布
同城双活/异地多活
路由转移
故障转移 | ① 区域条件匹配蓝绿发布
② 区域权重灰度发布
③ 区域多活单元化
④ 区域调试路由
- 多区域路由隔离下跨区服务调用的调试手段
⑤ 区域故障转移
- 未找到相应区域的服务实例,路由到其它区域
- 负载均衡策略、指定区域策略 | n-d-region
n-d-region-weight
n-d-region-transfer
n-d-region-failover |
| 环境 | 服务实例的环境
适用于测试环境 | 路由隔离
故障转移 | ① 环境隔离路由
- Header(n-d-env)和提供端的元数据env是否相同
② 环境故障转移
- 未找到相应环境的服务实例,路由到其它环境
- 指定环境(未配置,默认为common)策略 | n-d-env
n-d-env-failover |
| 可用区 | 服务实例的可用区
适用于多机房 | 路由隔离
故障转移 | ① 可用区亲和性隔离路由
- 调用端和提供端的元数据zone是否相同
② 可用区故障转移
- 未找到相应可用区的服务实例,路由到其它可用区
- 支持负载均衡策略、指定区可用区策略 | n-d-zone-failover |
| IP地址和端口 |服务实例机器地址 | 蓝绿灰度发布
路由隔离
故障转移
无损下线 | ① IP地址和端口匹配蓝绿发布
② IP地址和端口权重灰度发布
③ IP地址和端口故障转移
- 未找到相应IP地址和端口的服务实例,路由到其它地址
- 负载均衡策略、指定区IP地址和端口策略
④ IP地址和端口无损下线黑名单屏蔽 | n-d-address
n-d-address-failover
n-d-address-blacklist |
| 全局唯一ID | 服务实例机器ID | 无损下线 | ① 全局唯一ID无损下线黑名单屏蔽 | n-d-id-blacklist |

### 发展历程
- 2017年12月开始筹划
- 2018年03月开始编码
- 2018年06月在GitHub开源
- 2018年06月发布v1.0.0,支持Camden版
- 2018年06月发布v2.0.0,支持Dalston版
- 2018年07月发布v3.0.0,支持Edgware版
- 2018年07月发布v4.0.0,支持Finchley版
- 2019年04月发布v5.0.0,支持Greenwich版
- 2020年04月发布v6.0.0,支持Hoxton版
- 2021年04月完成v7.0.0,支持2020版
- 2022年04月完成v8.0.0,支持2021版
- 2023年01月完成v9.0.0,支持2022版
- 2024年03月完成v10.0.0,支持2023版
### 版本列表
① 微服务框架版本兼容列表,如下
 提醒:版本号右边, `↑` 表示>=该版本号, `↓` 表示<=该版本号
| 框架版本 | 框架分支 | 框架状态 | Spring Cloud版本 | Spring Boot版本 | Spring Cloud Alibaba版本 |
| --- | --- | --- | --- | --- | --- |
| 10.0.0
商业版 | DiscoveryX/master |  | 2023.x.x | 3.2.x | 2023.x.x.x |
| 9.0.0
商业版 | DiscoveryX/9.x.x |  | 2022.x.x | 3.1.x
3.0.x | 2022.x.x.x |
| 8.0.0
商业版 | DiscoveryX/8.x.x |  | 2021.x.x | 2.7.x
2.6.x | 2021.x.x.x |
| 7.0.0
商业版 | DiscoveryX/7.x.x |  | 2020.x.x | 2.5.x
2.4.1 `↑` | 2021.x |
| 6.22.0 | Discovery/6.x.x |  | Hoxton.SR5 `↑`
Hoxton
Greenwich
Finchley | 2.3.x.RELEASE
2.2.x.RELEASE
2.1.x.RELEASE
2.0.x.RELEASE | 2.2.7.RELEASE `↑` |
| 6.12.12 `↓` | Discovery/6.x.x |  | Hoxton.SR5 `↑`
Hoxton
Greenwich
Finchley | 2.3.x.RELEASE
2.2.x.RELEASE
2.1.x.RELEASE
2.0.x.RELEASE | 2.2.6.RELEASE `↓`
2.1.x.RELEASE
2.0.x.RELEASE |
| ~~5.6.0~~ | ~~Discovery/5.x.x~~ |  | Greenwich | 2.1.x.RELEASE | 2.1.x.RELEASE |
| ~~4.15.0~~ | ~~Discovery/4.x.x~~ |  | Finchley | 2.0.x.RELEASE | 2.0.x.RELEASE |
| 3.40.0 | Discovery/3.x.x |  | Edgware | 1.5.x.RELEASE | 1.5.x.RELEASE |
| ~~2.0.x~~ | ~~Discovery/2.x.x~~ |  | Dalston | 1.x.x.RELEASE | 1.5.x.RELEASE |
| ~~1.0.x~~ | ~~Discovery/1.x.x~~ |  | Camden | 1.x.x.RELEASE | 1.5.x.RELEASE |
 表示维护中 |  表示不维护,但可用,强烈建议升级 |  表示不维护,不可用,已废弃
- 10.x.x版本(适用于2023.x.x)将继续维护
- 9.x.x版本(适用于2022.x.x)将继续维护
- 8.x.x版本(适用于2021.x.x)将继续维护
- 7.x.x版本(适用于2020.x.x)将继续维护
- 6.x.x版本(同时适用于Finchley、Greenwich和Hoxton)将继续维护
- 5.x.x版本(适用于Greenwich)已废弃
- 4.x.x版本(适用于Finchley)已废弃
- 3.x.x版本(适用于Edgware)不维护,但可用,强烈建议升级
- 2.x.x版本(适用于Dalston)已废弃
- 1.x.x版本(适用于Camden)已废弃
② 相关中间件版本列表,如下
| 组件类型 | 组件版本 |
| --- | --- |
| 基础组件 | [](https://search.maven.org/artifact/com.google.guava/guava)
[](https://search.maven.org/artifact/com.github.ben-manes.caffeine/caffeine)
[](https://search.maven.org/artifact/org.redisson/redisson-spring-boot-starter)
[](https://search.maven.org/artifact/org.dom4j/dom4j)
[](https://search.maven.org/artifact/io.swagger/swagger-models)
[](https://search.maven.org/artifact/io.springfox/springfox-swagger2) |
| 注册配置组件 | [](https://search.maven.org/artifact/com.ctrip.framework.apollo/apollo-client)
[](https://search.maven.org/artifact/org.apache.curator/curator-framework)
[](https://search.maven.org/artifact/com.ecwid.consul/consul-api)
[](https://search.maven.org/artifact/io.etcd/jetcd-core)
[](https://search.maven.org/artifact/com.alibaba.nacos/nacos-client)
[](https://search.maven.org/artifact/com.netflix.eureka/eureka-client)
[](https://search.maven.org/artifact/org.springframework.data/spring-data-redis)
[](https://search.maven.org/artifact/org.redisson/redisson-spring-boot-starter) |
| 防护组件 | [](https://search.maven.org/artifact/com.alibaba.csp/sentinel-core)
[](https://search.maven.org/artifact/com.netflix.hystrix/hystrix-core) |
| 监控组件 | [](https://search.maven.org/artifact/org.apache.skywalking/apm-toolkit-opentracing)
[](https://search.maven.org/artifact/io.opentelemetry/opentelemetry-api)
[](https://search.maven.org/artifact/io.opentracing/opentracing-api)
[](https://search.maven.org/artifact/io.opentracing.contrib/opentracing-spring-cloud-starter)
[](https://search.maven.org/artifact/io.opentracing.contrib/opentracing-spring-jaeger-starter)
[](https://search.maven.org/artifact/io.opentracing.contrib/opentracing-concurrent)
[](https://search.maven.org/artifact/de.codecentric/spring-boot-admin-dependencies) |
| Spring组件 | [](https://search.maven.org/artifact/com.alibaba.spring/spring-context-support)
[](https://search.maven.org/artifact/org.springframework.cloud/spring-cloud-dependencies)
[](https://search.maven.org/artifact/com.alibaba.cloud/spring-cloud-alibaba-dependencies)
[](https://search.maven.org/artifact/org.springframework.boot/spring-boot-dependencies) |
### 企业用户
不完全统计,目前社区开源项目(包括本框架以及关联框架或组件)已经被如下公司使用或者调研
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |