You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/07/19 04:25:56 UTC
[GitHub] [apisix] spacewander commented on issue #4623: bug: traffic-split plugin
spacewander commented on issue #4623:
URL: https://github.com/apache/apisix/issues/4623#issuecomment-882227017
Can't be reproduced on my side.
The route:
```
{
"uri": "/hello",
"plugins": {
"traffic-split": {
"disable": false,
"rules": [
{
"match": [
{
"vars": [
[
"http_release",
"==",
"new_release"
]
]
}
],
"weighted_upstreams": [
{
"upstream": {
"name": "upstream_A",
"nodes": {
"127.0.0.1:1980": 10
},
"type": "roundrobin"
}
}
]
}
]
}
},
"upstream": {
"type": "roundrobin",
"nodes": {
"127.0.0.1:1979": 1
}
}
}
```
The wrk script:
```
wrk.headers["release"] = "new_release"
```
Set up Nginx to listen 1980 but not 1979.
Run curl & wrk:
```
¥ curl http://127.0.0.1:9080/hello
<html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>openresty</center>
</body>
</html>
incubator-apisix (pbp) 0
¥ curl http://127.0.0.1:9080/hello -H "release: new_release"
OK%
incubator-apisix (pbp) 0
¥ wrk http://127.0.0.1:9080/hello -s ~/wrk/hdr.lua -d 60
Running 1m test @ http://127.0.0.1:9080/hello
2 threads and 10 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 1.58ms 160.80us 6.11ms 79.31%
Req/Sec 3.18k 128.69 3.47k 64.67%
379688 requests in 1.00m, 58.64MB read
Requests/sec: 6328.03
Transfer/sec: 0.98MB
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org