Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
discovery
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
陈文顺
discovery
Commits
f57cdb7d
Commit
f57cdb7d
authored
Jul 10, 2018
by
Nepxion
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改版本
parent
8bb24b34
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletions
+10
-1
README.md
+10
-1
No files found.
README.md
View file @
f57cdb7d
...
@@ -513,6 +513,11 @@ spring-cloud-consul的2.0.0.RELEASE(目前最新的稳定版)支持consul-ap
...
@@ -513,6 +513,11 @@ spring-cloud-consul的2.0.0.RELEASE(目前最新的稳定版)支持consul-ap
| C2 | 1301 | 5301 | 1.1 |
| C2 | 1301 | 5301 | 1.1 |
| C3 | 1302 | 5302 | 1.2 |
| C3 | 1302 | 5302 | 1.2 |
独立控制台见discovery-springcloud-example-console,对应的版本和端口号如下表
| 服务端口 | 管理端口 |
| --- | --- |
| 2222 | 3333 |
### 示例操作过程和效果
### 示例操作过程和效果
黑/白名单的IP地址注册的过滤
黑/白名单的IP地址注册的过滤
-
在rule.xml把本地IP地址写入到相应地方
-
在rule.xml把本地IP地址写入到相应地方
...
@@ -542,7 +547,7 @@ spring-cloud-consul的2.0.0.RELEASE(目前最新的稳定版)支持consul-ap
...
@@ -542,7 +547,7 @@ spring-cloud-consul的2.0.0.RELEASE(目前最新的稳定版)支持consul-ap
-
再执行3.1步骤,如图2,可以看到符合图3的虚线调用路径,符合逻辑,灰度版本切换成功
-
再执行3.1步骤,如图2,可以看到符合图3的虚线调用路径,符合逻辑,灰度版本切换成功
-
灰度版本控制
-
灰度版本控制
-
通过Postman或者浏览器,执行POST
[
http://localhost:1200/config/send
](
http://localhost:1200/config/send
)
,发送新的规则XML(内容见下面),表示B服务的所有版本都只能访问C服务3.0版本,而本例中C服务3.0版本是不存在的,意味着B服务不能访问C服务
-
通过Postman或者浏览器,执行POST
[
http://localhost:1200/config/send
](
http://localhost:1200/config/send
)
,发送新的规则XML(内容见下面),表示B服务的所有版本都只能访问C服务3.0版本,而本例中C服务3.0版本是不存在的,意味着B服务不能访问C服务
-
访问
[
http://localhost:1201/config/send
](
http://localhost:1201/config/send
)
,重复4.1步骤
-
访问
[
http://localhost:1201/config/send
](
http://localhost:1201/config/send
)
,重复4.1步骤
,目前支持批量更新规则,见图5,前提是需要开启独立控制台
-
重复3.1步骤,发现调用路径只有A服务->B服务,符合逻辑,灰度版本控制成功,如图3
-
重复3.1步骤,发现调用路径只有A服务->B服务,符合逻辑,灰度版本控制成功,如图3
-
负载均衡的灰度测试
-
负载均衡的灰度测试
-
通过Postman或者浏览器,执行POST
[
http://localhost:1100/invoke
](
http://localhost:1100/invoke
)
,这是example内置的单条路由实例(通过Feign实现)
-
通过Postman或者浏览器,执行POST
[
http://localhost:1100/invoke
](
http://localhost:1100/invoke
)
,这是example内置的单条路由实例(通过Feign实现)
...
@@ -577,6 +582,10 @@ spring-cloud-consul的2.0.0.RELEASE(目前最新的稳定版)支持consul-ap
...
@@ -577,6 +582,10 @@ spring-cloud-consul的2.0.0.RELEASE(目前最新的稳定版)支持consul-ap


图5

### 切换服务注册组件
### 切换服务注册组件
如果使用者想改变服务注册组件,请在discovery-springcloud-example/pom.xml进行切换
如果使用者想改变服务注册组件,请在discovery-springcloud-example/pom.xml进行切换
```
xml
```
xml
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment