
# 约束与限制
#### Nacos引擎与微服务框架版本关系
| Nacos引擎版本 | Spring Cloud Alibaba版本   | Spring Cloud版本              | Spring Boot版本  |
|:---|:---|:---|:---|
| 2.1.0.x   | 2022.0.0.0-RC\*          | Spring Cloud 2022.0.0       | 3.0.0          |
| 2.1.0.x   | 2021.0.4.0\*             | Spring Cloud 2021.0.4       | 2.6.11         |
| 2.1.0.x   | 2021.0.1.0               | Spring Cloud 2021.0.1       | 2.6.3          |
| 2.1.0.x   | 2021.1                   | Spring Cloud 2020.0.1       | 2.4.2          |
| 2.1.0.x   | 2.2.10-RC1\*             | Spring Cloud Hoxton.SR12    | 2.3.12.RELEASE |
| 2.1.0.x   | 2.2.9.RELEASE            | Spring Cloud Hoxton.SR12    | 2.3.12.RELEASE |
| 2.1.0.x   | 2.2.8.RELEASE            | Spring Cloud Hoxton.SR12    | 2.3.12.RELEASE |
| 2.1.0.x   | 2.2.7.RELEASE            | Spring Cloud Hoxton.SR12    | 2.3.12.RELEASE |
| 2.1.0.x   | 2.2.6.RELEASE            | Spring Cloud Hoxton.SR9     | 2.3.2.RELEASE  |
| 2.1.0.x   | 2.2.1.RELEASE            | Spring Cloud Hoxton.SR3     | 2.2.5.RELEASE  |
| 2.1.0.x   | 2.2.0.RELEASE            | Spring Cloud Hoxton.RELEASE | 2.2.X.RELEASE  |
| 2.1.0.x   | 2.1.4.RELEASE            | Spring Cloud Greenwich.SR6  | 2.1.13.RELEASE |
| 2.1.0.x   | 2.1.2.RELEASE            | Spring Cloud Greenwich      | 2.1.X.RELEASE  |
| 2.1.0.x   | 2.0.4.RELEASE(停止维护，建议升级) | Spring Cloud Finchley       | 2.0.X.RELEASE  |
| 2.1.0.x   | 1.5.1.RELEASE(停止维护，建议升级) | Spring Cloud Edgware        | 1.5.X.RELEASE  |
   
#### 微服务开发框架版本要求
微服务开发框架推荐版本如下表所示。
- 如果已经使用低版本的微服务开发框架构建应用，建议升级到推荐版本，以获取最稳定和丰富的功能体验。
- 如果已使用Spring Cloud微服务开发框架开发了应用，推荐使用[Spring Cloud Huawei](https://github.com/huaweicloud/spring-cloud-huawei)接入应用。
- Spring Cloud Huawei各分支版本与Spring Boot、Spring Cloud、Java Chassis及JDK编译版本的配套关系请参考[版本配套说明](https://github.com/huaweicloud/spring-cloud-huawei/wiki/third-version-support-descriptions)。
- 如果基于开源开放和业界生态组件新开发微服务应用，可选择Spring Cloud框架。
- 如果希望使用ServiceComb引擎提供的开箱即用的治理能力和高性能的RPC框架，可选择Java Chassis框架。
| 框架                  | 推荐版本                                                                                                                                                                                                                                                                                                     | 说明                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
|:---|:---|:---|
| Spring Cloud Huawei | 1.11.14-xxxx.x及以上                                                                                                                                                                                                                                                                                        | 采用[Spring Cloud Huawei](https://github.com/huaweicloud/spring-cloud-huawei)项目提供接入支持： - 当Spring Cloud Huawei版本为1.11.14-2024.0.x时，适配的Spring Cloud版本为2024.0.3，Spring Boot版本为3.4.13。  - 当Spring Cloud Huawei版本为1.11.14-2023.0.x时，适配的Spring Cloud版本为2023.0.6，Spring Boot版本为3.3.13。  - 当Spring Cloud Huawei版本为1.11.14-2021.0.x时，适配的Spring Cloud版本为2021.0.9，Spring Boot版本为2.7.18。   Spring Cloud微服务开发框架的版本说明请参见：<https://github.com/huaweicloud/spring-cloud-huawei/releases>。 |
| Java Chassis        | - 当SDK版本为3.x时，推荐3.3.0及以上。  - 当SDK版本为2.9.x时，推荐2.9.3及以上。  - 其他版本推荐2.8.30及以上。   | 可以直接使用开源项目提供的软件包接入，不需要引用其他第三方软件包。 Java Chassis微服务开发框架的版本说明请参见：<https://github.com/apache/servicecomb-java-chassis/releases>。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
   
![](https://support.huaweicloud.com/productdesc-cse/public_sys-resources/notice_3.0-zh-cn.png)
系统升级、改造过程中，三方软件冲突是最常见的问题。随着软件迭代速度越来越快，传统的软件兼容性管理策略已经不适应软件的发展，您可以参考[三方软件版本管理策略](https://support.huaweicloud.com/bestpractice-cse/cse_05_0007.html)来解决版本冲突。
#### Spring-cloud-huawei、Servicecomb及Sermant功能对比
| 一级特性                                         | 二级特性                 | servicecomb-java-chassis                                                                                                                                                                   | spring-cloud-huawei                                                                                                                                                                        | sermant agent | 备注                                                                                                                                                                                                                                                                                           |
|:---|:---|:---|:---|:---|:---|
| 微服务网关                                        | 服务端限流                | √                                                                                                                                                                                          | √                                                                                                                                                                                          | √             | -                                                                                                                                                                                                                                                                                            |
| 微服务网关                                        | 服务端隔离仓               | √                                                                                                                                                                                          | √                                                                                                                                                                                          | √             | -                                                                                                                                                                                                                                                                                            |
| 微服务网关                                        | 客户端熔断                | ×                                                                                                                                                                                          | √                                                                                                                                                                                          | ×             | -                                                                                                                                                                                                                                                                                            |
| 微服务网关                                        | 客户端容错                | ×                                                                                                                                                                                          | √                                                                                                                                                                                          | ×             | -                                                                                                                                                                                                                                                                                            |
| 微服务网关                                        | 客户端降级                | ×                                                                                                                                                                                          | ×                                                                                                                                                                                          | ×             | -                                                                                                                                                                                                                                                                                            |
| 微服务网关                                        | 客户端故障注入              | ×                                                                                                                                                                                          | ×                                                                                                                                                                                          | ×             | -                                                                                                                                                                                                                                                                                            |
| 微服务网关                                        | 负载均衡策略               | √                                                                                                                                                                                          | √                                                                                                                                                                                          | ×             | -                                                                                                                                                                                                                                                                                            |
| 微服务网关                                        | 灰度发布                 | ×                                                                                                                                                                                          | √                                                                                                                                                                                          | √             | -                                                                                                                                                                                                                                                                                            |
| 微服务网关                                        | 优雅停机                 | √                                                                                                                                                                                          | √                                                                                                                                                                                          | ×             | -                                                                                                                                                                                                                                                                                            |
| 微服务治理  | 优雅上下线                | √                                                                                                                                                                                          | √                                                                                                                                                                                          | √             | -                                                                                                                                                                                                                                                                                            |
| 微服务治理  | 无损升级                 | √                                                                                                                                                                                          | √                                                                                                                                                                                          | √             | -                                                                                                                                                                                                                                                                                            |
| 微服务治理  | 服务端限流                | √                                                                                                                                                                                          | √                                                                                                                                                                                          | √             | -                                                                                                                                                                                                                                                                                            |
| 微服务治理  | 客户端容错                | √                                                                                                                                                                                          | √                                                                                                                                                                                          | √             | -                                                                                                                                                                                                                                                                                            |
| 微服务治理  | 客户端熔断                | √                                                                                                                                                                                          | √                                                                                                                                                                                          | √             | -                                                                                                                                                                                                                                                                                            |
| 微服务治理  | 客户端降级                | √                                                                                                                                                                                          | √                                                                                                                                                                                          | √             | -                                                                                                                                                                                                                                                                                            |
| 微服务治理  | 服务端隔离仓               | √                                                                                                                                                                                          | √                                                                                                                                                                                          | √             | -                                                                                                                                                                                                                                                                                            |
| 微服务治理  | 客户端隔离仓               | √                                                                                                                                                                                          | √                                                                                                                                                                                          | √             | -                                                                                                                                                                                                                                                                                            |
| 微服务治理  | 负载均衡策略               | √                                                                                                                                                                                          | √                                                                                                                                                                                          | √             | -                                                                                                                                                                                                                                                                                            |
| 微服务治理  | 灰度发布                 | √                                                                                                                                                                                          | √                                                                                                                                                                                          | √             | -                                                                                                                                                                                                                                                                                            |
| 微服务治理  | 全链路日志追踪              | √                                                                                                                                                                                          | √                                                                                                                                                                                          | ×             | -                                                                                                                                                                                                                                                                                            |
| 微服务治理  | 服务治理状态上传             | √                                                                                                                                                                                          | √                                                                                                                                                                                          | ×             | -                                                                                                                                                                                                                                                                                            |
| 微服务治理  | 快速失败                 | √                                                                                                                                                                                          | √                                                                                                                                                                                          | ×             | -                                                                                                                                                                                                                                                                                            |
| 微服务治理  | 故障注入                 | √                                                                                                                                                                                          | ×                                                                                                                                                                                          | √             | -                                                                                                                                                                                                                                                                                            |
| 微服务治理  | 黑白名单                 | √                                                                                                                                                                                          | √                                                                                                                                                                                          | ×             | -                                                                                                                                                                                                                                                                                            |
| 注册发现                                         | 本地注册发现               | √                                                                                                                                                                                          | √                                                                                                                                                                                          | ×             | -                                                                                                                                                                                                                                                                                            |
| 注册发现                                         | 单注册-CSE              | √                                                                                                                                                                                          | √                                                                                                                                                                                          | √             | -                                                                                                                                                                                                                                                                                            |
| 注册发现                                         | 单注册-ServiceCenter    | √                                                                                                                                                                                          | √                                                                                                                                                                                          | √             | -                                                                                                                                                                                                                                                                                            |
| 注册发现                                         | 双注册                  | ×                                                                                                                                                                                          | ×                                                                                                                                                                                          | √             | 双注册指同时注册到两个注册中心，当前sermant支持同时注册到cse和宿主原生注册中心。                                                                                                                                                                                                                                                |
| 配置中心支持                                       | servicecomb引擎        | √                                                                                                                                                                                          | √                                                                                                                                                                                          | √             | 可基于配置中心下发配置, 例如服务治理规则、业务配置。                                                                                                                                                                                                                                                                  |
| 配置中心支持                                       | Nacos引擎              | √                                                                                                                                                                                          | √                                                                                                                                                                                          | √             | 可基于配置中心下发配置, 例如服务治理规则、业务配置。                                                                                                                                                                                                                                                                  |
| 配置中心支持                                       | servicecomb-kie      | √                                                                                                                                                                                          | √                                                                                                                                                                                          | √             | 可基于配置中心下发配置, 例如服务治理规则、业务配置。                                                                                                                                                                                                                                                                  |
| 配置中心支持                                       | zookeeper            | ×                                                                                                                                                                                          | ×                                                                                                                                                                                          | √             | 可基于配置中心下发配置, 例如服务治理规则、业务配置。                                                                                                                                                                                                                                                                  |
| 配置中心支持                                       | 轻量化配置中心（zero-config） | √                                                                                                                                                                                          | ×                                                                                                                                                                                          | ×             | 可基于配置中心下发配置, 例如服务治理规则、业务配置。                                                                                                                                                                                                                                                                  |
| 配置中心支持                                       | apollo               | ×                                                                                                                                                                                          | ×                                                                                                                                                                                          | ×             | 可基于配置中心下发配置, 例如服务治理规则、业务配置。                                                                                                                                                                                                                                                                  |
| 安全特性                                         | 安全认证                 | √                                                                                                                                                                                          | √                                                                                                                                                                                          | ×             | 服务实例与注册中心以及消费端与生产端之间的认证。                                                                                                                                                                                                                                                                     |
| 开发                                           | 多协议支持                | √                                                                                                                                                                                          | ×                                                                                                                                                                                          | ×             | JavaChassis针对消费与生产端支持多种通信协议，如下： - 生产端：JAX-RS、SpringMVC、透明RPC。  - 消费端：透明RPC、RestTemplate、InvokerUtils。   |
| 开发                                           | 拓展                   | - 支持用户自定义处理链处理流量。  - 支持用户扩展流量治理。   | - 支持Spring Cloud原生扩展。  - 支持用户扩展流量治理。   | 基于插件开发模式新增能力。 | -                                                                                                                                                                                                                                                                                            |
   
#### 配额说明
配额是指您引擎实例中可创建的资源数量限制。如需使用更大配额，请[提交工单](https://support.huaweicloud.com/usermanual-ticket/zh-cn_topic_0127038618.html)申请扩大配额。
- Nacos引擎实例中可创建的资源数量限制如[表1]所示。
   表1Nacos引擎资源配额限制 
  | 资源                | 最大配额    | 是否支持修改配额 | 注意事项 |
  |:---|:---|:---|:---|
  | Nacos单实例命名空间数量    | 50个     | 否        | -    |
  | Nacos单个配置文件大小上限   | 100KB   | 否        | -    |
  | Nacos单个命名空间配置总计大小 | 10MB    | 否        | -    |
  | 带宽（网络流出+流入之和）     | 2Mbit/s | 否        | -    |
     
  

- ServiceComb引擎实例中可创建的资源数量限制如[表2]所示。
   表2ServiceComb引擎资源配额限制 
  | 功能    | 资源           | 最大配额   | 是否支持修改配额 | 注意事项                   |
  |:---|:---|:---|:---|:---|
  | 微服务管理 | 微服务版本数量（个）   | 10,000 | 暂不支持     | -                      |
  | 微服务管理 | 单个实例数据量（KB）  | 200    | 支持       | 扩大配额后，将增加微服务发现的时延。     |
  | 微服务管理 | 单个微服务契约数量（个） | 500    | 暂不支持     | -                      |
  | 配置管理  | 单个配置数据量（KB）  | 128    | 暂不支持     | -                      |
  | 配置管理  | 单个应用级配置数量（个） | 2,000  | 暂不支持     | -                      |
  | 微服务治理 | 应用级的治理策略     | 1,000  | 暂不支持     | 所有的应用的治理策略总和不能超过1000条。 |
     
  ![](https://support.huaweicloud.com/productdesc-cse/public_sys-resources/note_3.0-zh-cn.png)
  - 单个治理策略包含：治理规则和业务场景。治理规则和业务场景实际会等量占用配置中心的配额。
  
  - 微服务版本数：微服务场景中版本用来标记微服务的迭代记录，方便对微服务的不同迭代进行管理。
  
  - 微服务实例数：实例是一个微服务的最小运行和部署单元，通常对应一个应用进程。同一个微服务通过部署在多个容器或虚机，可以实现多个实例同时运行。
  
  - 配置条目数：微服务场景中的配置是指对程序代码中某些变量的取值控制。比如，动态配置就是通过在微服务运行过程中对某些变量的取值进行动态变更。
    
 
