Skip to content

Commit

Permalink
Add some new description for 2.0.0 (alibaba#167)
Browse files Browse the repository at this point in the history
* Add some new description for 2.0.0

* Add some new description for 2.0.0
  • Loading branch information
KomachiSion authored Mar 22, 2021
1 parent 08a74af commit 174c7cf
Show file tree
Hide file tree
Showing 97 changed files with 292 additions and 224 deletions.
2 changes: 1 addition & 1 deletion build/documentation.js

Large diffs are not rendered by default.

69 changes: 39 additions & 30 deletions docs/en-us/2.0.0-alpha.md → docs/en-us/2.0.0-compatibility.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,39 @@
---
title: Nacos 2.0.0-BETA
title: Nacos 2.0.0 compatibility
keywords: Nacos,2.0.0
description: Nacos 2.0.0-BETA
description: Nacos 2.0.0 compatibility
---

# Nacos 2.0.0-BETA
# Nacos 2.0.0 compatibility

After nearly 5 months of discussion and development in the community, the core features of Nacos 2.0.0 based on the long connection have been developed completely.
After discussion and development in the community, the core features of Nacos 2.0.0 based on the long connection have been developed completely.

2.0.0-BETA.2 public testing for community currently.
2.0.0 has released and welcome to use.

**Note that the ALPHA and BETA version is only for testing and discussion, please use it in uat or pre-environment. The interface API and features presentation results provided by the ALPHA and BETA version may be inconsistent with the release version, please refer to the release version.**

The 2.0.0-ALPHA version is an independent version temporarily, and not support upgrade server from version 1.X to 2.0.0-ALPHA smoothly. The release version will support it. Please pay attention to the subsequent upgrade documents.

2.0.0-BETA adds the ability to smoothly upgrade and downgrade, please refer to [Nacos2.0 upgrade document]() for details.
2.0.0 support to smoothly upgrade and downgrade with Nacos1.X server, please refer to [Nacos2.0 upgrade document](https://nacos.io/en-us/docs/2.0.0-upgrading.html) for details.

## Benchmark for Nacos 2.0.0

Detail see: [Nacos2.0 Naming Benchmark](/en-us/docs/nacos2-naming-benchmark.html) and [Nacos2.0 Config Benchmark](/en-us/docs/nacos2-config-benchmark.html) .

## Deployment

Refer to [Deployment Guide](https://nacos.io/en-us/docs/deployment.html) and replace the version to 2.0.0-BETA.
Compared with 1.X, Nacos2.0 adds gRPC communication mode, so there are 2 ports need to be added. The new ports are generated with a certain offset based on the configured main port (server.port).

|port|offset from main port|description|
|--|--|--|
|9848|1000|The client gRPC requests the server port, which is used by the client to initiate a connection and request to the server|
|9849|1001|Server-side gRPC requests server-side port, used for synchronization between services, etc.|

The client has the same offset logic. The users configures the main port (default 8848) as in the use of 1.X, and calculates the corresponding gRPC port (default 9848) through the same offset.

Therefore, if there is a port forwarding or firewall between the client and the server, the port forwarding configuration and firewall configuration need to be adjusted accordingly.

Other detail refer to [Deployment Guide](https://nacos.io/en-us/docs/deployment.html) and replace the version to 2.0.0-BETA.

## Compatibility

The server of Nacos2.0 is fully compatible with 1.X clients. The Nacos2.0 client is not compatible with the Nacos1.X server because it uses gRPC. Please do not use the client of version 2.0 or higher to connect to the Nacos1.X server.

## Features completion and adaptation for the old client

Expand All @@ -43,17 +54,14 @@ Refer to [Deployment Guide](https://nacos.io/en-us/docs/deployment.html) and rep

### Service Discovery

Due to major changes in the data model of service discovery, A few features are temporarily unsupported.

#### JAVA SDK

- Not support registration of persistent instances temporarily;
- Compatible with ephemeral instances interfaces;
- Implement with ephemeral instances interfaces;
- Completely compatible with all interfaces of 1.X client;
- Completely implement all interfaces of 2.X client.

#### Other SDK

- Compatible with all operation of ephemeral instances interfaces;
- Completely compatible

#### openAPI

Expand All @@ -74,8 +82,8 @@ Due to major changes in the data model of service discovery, A few features are
- Query server list (Supported)
- Query the leader of current cluster (Deprecated)
- Update instance health status (Supported)
- Batch update instance metadata(Beta, Not support)
- Batch delete instance metadata(Beta, Not support)
- Batch update instance metadata(Supported)
- Batch delete instance metadata(Supported)

### Console

Expand Down Expand Up @@ -123,22 +131,21 @@ Use Nacos 2.0 connection features by specifying nacos-client version.

### Dubbo

Because Dubbo obtains part of the Nacos client content through reflection in the configuration center (metadata center), it is temporarily incompatible with the 2.0.0-BETA version.
At present, we have communicated with the dubbo community to solve the adaptation problem as soon as possible.
The Nacos2.0 version of the client is re-adapted to Dubbo2.7.X. And the Dubbo community is making changes to the new version, no longer relying on reflection, please see [Dubbo#7291](https://github.com/apache/dubbo/issues/7291).

### Nacos Spring Boot

Nacos spring boot will release an BETA version with the new version of Nacos client.
Nacos spring boot will release a new version to adapt to the 2.0.0 client.

## Usage

### SDK and Console

The usage of Nacos 2.0.0-BETA version is exactly the same as that of Nacos 1.X version. For the client interface, please refer to [JAVA SDK](https://nacos.io/en-us/docs/sdk.html) of Nacos1.X.
The usage of Nacos 2.0.0 version is exactly the same as that of Nacos 1.X version. For the client interface, please refer to [JAVA SDK](https://nacos.io/en-us/docs/sdk.html) of Nacos1.X.

### Server

The deployment and usage of the Nacos 2.0.0-BETA server is not much different from the old version. Here only to describe the new configuration parameters in the new version.
The usage of the Nacos 2.0.0 server is not much different from the old version. Here only to describe the new configuration parameters in the new version.

|Parameters|Default|Description|
|--|--|--|
Expand All @@ -149,12 +156,6 @@ The deployment and usage of the Nacos 2.0.0-BETA server is not much different fr

## FAQ

### Why can't upgrade smoothly? Can it be supported in future?

Since the service model and data model of the Nacos service discovery have been redesigned, the data structure has major changes, so smoothly upgrading are temporarily not supported.

When 2.0.0 Released, will support part of 1.X version to upgrade smoothly. Please pay attention to community and upgrade document.

### Whether support the old client?

Configuration Management can support all clients after 1.0, and Service Management can support all client after 1.2.
Expand All @@ -175,4 +176,12 @@ Or use `-Dnacos.server.ip=${domain}` jvm parameters to start nacos and set domai

This package will be auto-generated by `protobuf`, so if you want to read source code or do some develop, you can use `mvn compile` to generate them. If you are using IDEA, you can also use IDEA's protobuf plugin.

### Error `Connection is unregistered.` or `Client not connected, current status:STARTING` during startup client.

The reason is that the client gRPC cannot establish a connection with the server. Please use `telnet ${nacos.server.address}:${nacos.server.grpc.port}` to test the network and to check the server port is correct.

If there is no problem with the server, check whether the configuration is wrong. The configured ports of the server and client should be the same.

If there is no problem with the configuration, check whether there is a firewall or VIP port forwarding problem. The gRPC ports of Nacos2.0 are calculated by the offset of the main port, so the port forwarding also needs to meet the offset.

### To be added...
69 changes: 41 additions & 28 deletions docs/zh-cn/2.0.0-alpha.md → docs/zh-cn/2.0.0-compatibility.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,39 @@
---
title: Nacos 2.0.0-BETA 文档
title: Nacos 2.0.0 兼容性文档
keywords: Nacos,2.0.0
description: Nacos 2.0.0-BETA 文档
description: Nacos 2.0.0 兼容性文档
---

# Nacos 2.0.0-BETA 文档
# Nacos 2.0.0 兼容性文档

经过社区近5个月的讨论和开发, Nacos 基于长连接的2.0.0版本的核心功能已开发完成,目前开放2.0.0-BETA版本,供社区公测
经过社区的讨论和开发, Nacos 基于长连接的2.0.0版本的核心功能已开发完成,目前2.0.0正式版本已发布,欢迎大家使用

**注意,ALPHA,BETA版本仅供测试讨论,请在测试及预发环境中使用。ALPHA,BETA版本提供的接口API及功能呈现结果可能会和正式版本存在不一致的情况,请以后续正式版本为准**

2.0.0-ALPHA版本暂时为独立版本,无法进行服务端1.X版本到2.0.0-ALPHA的平滑升级,正式版本时会支持部分版本到该版本的平滑升级,请关注后续的升级文档。

2.0.0-BETA新增平滑升降级的能力,详情请查看[Nacos2.0升级文档]()
2.0.0支持Nacos1.X服务端的平滑升降级的能力,详情请查看[Nacos2.0升级文档](https://nacos.io/zh-cn/docs/2.0.0-upgrading.html)

## Nacos 2.0.0版本压测

详情见:[Nacos2.0服务发现模块压测报告](/zh-cn/docs/nacos2-naming-benchmark.html) 以及 [Nacos2.0配置模块压测报告](/zh-cn/docs/nacos2-config-benchmark.html)

大规模压测报告将在近期放出。

## 新版本部署

参考[Nacos部署手册](https://nacos.io/zh-cn/docs/deployment.html) ,将版本相关替换成2.0.0-BETA。
Nacos2.0版本相比1.X新增了gRPC的通信方式,因此需要增加2个端口。新增端口是在配置的主端口(server.port)基础上,进行一定偏移量自动生成。

|端口|与主端口的偏移量|描述|
|--|--|--|
|9848|1000|客户端gRPC请求服务端端口,用于客户端向服务端发起连接和请求|
|9849|1001|服务端gRPC请求服务端端口,用于服务间同步等|

客户端拥有相同的计算逻辑,用户如同1.X的使用方式,配置主端口(默认8848),通过相同的偏移量,计算对应gRPC端口(默认9848)。

因此如果客户端和服务端之前存在端口转发,或防火墙时,需要对端口转发配置和防火墙配置做相应的调整。

其余部署参考[Nacos部署手册](https://nacos.io/zh-cn/docs/deployment.html) ,将版本相关替换成2.0.0。

## 兼容性

Nacos2.0的服务端完全兼容1.X客户端。Nacos2.0客户端由于使用了gRPC,无法兼容Nacos1.X服务端,请勿使用2.0以上版本客户端连接Nacos1.X服务端。

## 功能完成度及旧版本客户端适配情况:

Expand All @@ -29,7 +42,7 @@ description: Nacos 2.0.0-BETA 文档
#### JAVA SDK

- 完全兼容1.X客户端所有API接口方法;
- 完全实现2.X客户端所有API接口方法
- 完全实现2.0客户端所有API接口方法

#### 其他语言 SDK

Expand All @@ -41,16 +54,14 @@ description: Nacos 2.0.0-BETA 文档

### 服务发现

由于服务发现的数据模型发生了比较重大的改变,因此有少量功能暂时未支持。

#### JAVA SDK

- 兼容1.X客户端服务相关接口
- 实现2.X客户端非持久化服务接口。
- 完全兼容1.X客户端所有API接口方法
- 完全兼容2.0客户端所有API接口方法;

#### 其他语言 SDK

- 仅兼容非持久化服务实例相关操作
- 完全兼容所有服务发现相关openAPI

#### openAPI

Expand All @@ -71,8 +82,8 @@ description: Nacos 2.0.0-BETA 文档
- 查看当前集群Server列表(支持)
- 查看当前集群leader(将废弃)
- 更新实例的健康状态(支持)
- 批量更新实例元数据(Beta,不支持)
- 批量删除实例元数据(Beta,不支持)
- 批量更新实例元数据(支持)
- 批量删除实例元数据(支持)

### 控制台

Expand Down Expand Up @@ -120,22 +131,21 @@ description: Nacos 2.0.0-BETA 文档

### Dubbo

由于Dubbo在配置中心(元数据中心)通过反射获取Nacos客户端的部分内容,因此在对于2.0.0版本客户端暂时无法兼容。
目前已与dubbo社区进行沟通,尽快解决适配问题。
Nacos2.0版本客户端重新适配了Dubbo2.7.X。并且Dubbo社区正在对新版本进行修改,不再强依赖反射,详情请看 [Dubbo#7291](https://github.com/apache/dubbo/issues/7291)

### Nacos Spring Boot

Nacos spring boot 将会配合新版本Nacos客户端发布一个ALPHA版本
Nacos spring boot 将会发布新版本适配2.0.0客户端

## 使用方式

### SDK客户端、控制台

Nacos 2.0.0-BETA版本使用方式和Nacos1.X版本使用完全一致。客户端接口请参考Nacos1.X的[SDK文档](https://nacos.io/zh-cn/docs/sdk.html)
Nacos 2.0.0版本使用方式和Nacos1.X版本使用完全一致。客户端接口请参考Nacos1.X的[SDK文档](https://nacos.io/zh-cn/docs/sdk.html)

### 服务端

Nacos 2.0.0-BETA服务端的部署和使用也和旧版本没有太大区别,这里对新版本中新增的数个配置参数进行说明
Nacos 2.0.0服务端的使用也和旧版本没有太大区别,这里对新版本中新增的数个配置参数进行说明

|参数|默认值|描述|
|--|--|--|
Expand All @@ -146,11 +156,6 @@ Nacos 2.0.0-BETA服务端的部署和使用也和旧版本没有太大区别,

## FAQ

### 为什么暂不支持平滑升级,之后能支持吗?

由于Nacos服务发现模块的服务模型和数据模型都经过重新设计,因此数据结构等发生了比较大的变化,所以暂时不支持平滑升级。
在2.0.0正式版本发布的时候,会支持部分1.X版本到该版本的平滑升级,具体信息在正式发布时会更新升级相关的文档。

### 能否支持Nacos旧版本客户端?

配置中心兼容支持Nacos1.0起的所有版本客户端,服务发现兼容Nacos1.2起所有版本客户端。
Expand All @@ -168,4 +173,12 @@ Nacos在1.4版本后使用Jraft替换了自研的Raft实现,Jraft的选主比

这个包目录是由`protobuf`在编译时自动生成,您可以通过`mvn compile`来自动生成他们。如果您使用的是IDEA,也可以使用IDEA的protobuf插件。

### 启动时报错`Connection is unregistered.``Client not connected,current status:STARTING`.

原因是客户端gRPC无法和服务端创建连接,请先使用`telnet ${nacos.server.address}:${nacos.server.grpc.port}`进行测试,查看网络是否畅通,服务端端口是否已经正确监听。

若服务端没有问题,查看配置是否有误,服务端和客户端的所配置的端口应一致。

若配置也没有问题,查看是否有防火墙或VIP端口转发问题,Nacos2.0的gRPC端口均通过主端口的偏移量计算产生,因此端口转发也需要满足该偏移量。

### 待补充...
Loading

0 comments on commit 174c7cf

Please sign in to comment.