1 1、nginx.conf
 2     split_clients "${remote_addr}AAA" $request_type {
 3         25% "abtest";
 4         * "online";
 5     }
 6 2、mobile.vipkid.com.cn.conf
 7     if ($request_type = "abtest") {
 8         set $group _abtest;
 9     }
10                 proxy_pass http://mobile_vipkid_com_cn$group;
11 upstream mobile_vipkid_com_cn_abtest {
12         server 10.0.3.141:8080 weight=10 max_fails=3 fail_timeout=5s;
13         server 10.0.4.141:8080 weight=10 max_fails=3 fail_timeout=5s;
14    }
15 upstream mobile_vipkid_com_cn {
16         server 10.0.3.142:8080 weight=10 max_fails=3 fail_timeout=5s;
17         server 10.0.4.142:8080 weight=10 max_fails=3 fail_timeout=5s;
18    }

 

相关文章:

  • 2021-12-03
  • 2021-10-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-03
  • 2021-12-03
猜你喜欢
  • 2021-07-23
  • 2022-12-23
  • 2021-09-29
  • 2022-12-23
  • 2021-12-03
  • 2022-12-23
相关资源
相似解决方案