如何执行高级灰度发布 - Nepxion/Discovery Wiki

Original URL: https://github.com/Nepxion/Discovery/wiki/如何执行高级灰度发布

执行全链路灰度发布

网关控制的灰度发布策略

场景介绍:根据规则策略中的权重百分比改变,达到控制后端全链路调用路径的目的,也可以根据前端传递Header、Parameter、Cookie动态选择百分比流量分配。根据下面的设置

分别对Zuul和Spring Cloud Gateway增加版本条件权重灰度发布策略

<?xml version="1.0" encoding="UTF-8"?>
<rule>
    <strategy-release>
        <conditions type="gray">
            <condition id="gray-condition" version-id="gray-route=5;stable-route=95"/>
        </conditions>

        <routes>
            <route id="gray-route" type="version">{"discovery-guide-service-a":"1.1", "discovery-guide-service-b":"1.1"}</route>
            <route id="stable-route" type="version">{"discovery-guide-service-a":"1.0", "discovery-guide-service-b":"1.0"}</route>
        </routes>
    </strategy-release>
</rule>

① 对于Zuul,它的Group为discovery-guide-group,Data Id为discovery-guide-zuul

② 对于Spring Cloud Gateway,它的Group为discovery-guide-group,Data Id为discovery-guide-gateway

上述简单示例以版本条件匹配全链路蓝绿发布为例,更高级的发布功能,请参考http://nepxion.com/discovery全链路蓝绿灰度发布

           

Total visits