1
0
mirror of https://github.com/chai2010/advanced-go-programming-book.git synced 2025-05-23 20:02:22 +00:00

update gl img

This commit is contained in:
Xargin 2018-12-13 15:54:07 +08:00
parent a57fae31aa
commit a9b1cd583d
2 changed files with 3 additions and 26 deletions

View File

@ -13,32 +13,9 @@
## 5.9.1 通过分批次部署实现灰度发布
假如服务部署在 15 个实例(可能是物理机,也可能是容器)上,我们把这 15 个实例分为四组,按照先后顺序,分别有 1-2-4-8 台机器,保证每次扩展时大概都是二倍的关系。
```
┌───────┐ ┌───────┐ ┌───────┐ ┌───────┐
│ │ │ │ │ │ │┌─────┐│
│ │ │ │ │ │ │└─────┘│
│ │ │ │ │ │ │┌─────┐│
│ │ │ │ │ │ │└─────┘│
│ │ │ │ │ │ │┌─────┐│
│ │ │ │ │ │ │└─────┘│
│ │ │ │ │ │ │┌─────┐│
│ │ │ │ │ │ │└─────┘│
│ │ │ │ │┌─────┐│ │┌─────┐│
│ │ │ │ │└─────┘│ │└─────┘│
│ │ │ │ │┌─────┐│ │┌─────┐│
│ │ │ │ │└─────┘│ │└─────┘│
│ │ │┌─────┐│ │┌─────┐│ │┌─────┐│
│ │ │└─────┘│ │└─────┘│ │└─────┘│
│┌─────┐│ │┌─────┐│ │┌─────┐│ │┌─────┐│
│└─────┘│ │└─────┘│ │└─────┘│ │└─────┘│
└───────┘ └───────┘ └───────┘ └───────┘
group1 group2 group3 group4
```
假如服务部署在 15 个实例(可能是物理机,也可能是容器)上,我们把这 15 个实例分为四组,按照先后顺序,分别有 1-2-4-8 台机器,保证每次扩展时大概都是二倍的关系。
![online group](../images/ch5-online-group.png)
为什么要用 2 倍?这样能够保证我们不管有多少台机器,都不会把组划分得太多。例如 1024 台机器,实际上也就只需要 1-2-4-8-16-32-64-128-256-512 部署十次就可以全部部署完毕。

BIN
images/ch5-online-group.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB