nacos2.0.1服务权重没效果

使用原生的spring.cloud.gateway的方式搭建简易的网关。分别调用不同端口,权重分别为1和6的weight服务结果是两个端口调用比例是1:1。

原提问者GitHub用户602297770

展开
收起
学习娃 2023-05-22 16:09:30 95 分享 版权
1 条回答
写回答
取消 提交回答
  • 我也遇到这个问题了。我使用了SpringCloud + Gateway + Nacos。 我的配置如下:

    spring-cloud.version=2020.0.1 alibaba-cloud.version=2021.1

    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-gateway</artifactId>
        </dependency>
        <dependency>
            <groupId>com.alibaba.cloud</groupId>
            <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-loadbalancer</artifactId>
        </dependency>
    </dependencies>
    

    原回答者GitHub用户ibingdian

    2023-05-23 09:35:36
    赞同 展开评论