基于istio进行熔断限流时的问题


以上是我的服务svc yaml文件,当我在yaml文件中定义spec.ports.name中定义了名字为tcp-80时,进行熔断限流,使用fortio进行测试,最终结果如下

06:55:29 I logger.go:127> Log level is now 3 Warning (was 2 Info)
Fortio 1.17.1 running at 0 queries per second, 4->4 procs, for 30 calls: http://10.43.121.19:80/get
Starting at max qps with 3 thread(s) [gomax 4] for exactly 30 calls (10 per thread + 0)
06:55:29 E http_client.go:787> Read error &{{0xc00014c900}} 10.43.121.19:80 0 : read tcp 10.42.0.169:35832->10.43.121.19:80: read: connection reset by peer
06:55:29 E http_client.go:787> Read error &{{0xc00014ca00}} 10.43.121.19:80 0 : read tcp 10.42.0.169:35836->10.43.121.19:80: read: connection reset by peer
06:55:29 E http_client.go:787> Read error &{{0xc000294100}} 10.43.121.19:80 0 : read tcp 10.42.0.169:35838->10.43.121.19:80: read: connection reset by peer
06:55:29 E http_client.go:787> Read error &{{0xc0003be080}} 10.43.121.19:80 0 : EOF
06:55:29 E http_client.go:787> Read error &{{0xc00014cb00}} 10.43.121.19:80 0 : read tcp 10.42.0.169:35842->10.43.121.19:80: read: connection reset by peer
06:55:29 E http_client.go:787> Read error &{{0xc0003be180}} 10.43.121.19:80 0 : read tcp 10.42.0.169:35844->10.43.121.19:80: read: connection reset by peer
06:55:29 E http_client.go:787> Read error &{{0xc0000a4300}} 10.43.121.19:80 0 : read tcp 10.42.0.169:35846->10.43.121.19:80: read: connection reset by peer
06:55:29 E http_client.go:787> Read error &{{0xc0000a4400}} 10.43.121.19:80 0 : read tcp 10.42.0.169:35848->10.43.121.19:80: read: connection reset by peer
06:55:29 E http_client.go:787> Read error &{{0xc0000a4500}} 10.43.121.19:80 0 : read tcp 10.42.0.169:35850->10.43.121.19:80: read: connection reset by peer
06:55:29 E http_client.go:787> Read error &{{0xc0000a4600}} 10.43.121.19:80 0 : read tcp 10.42.0.169:35852->10.43.121.19:80: read: connection reset by peer
06:55:29 E http_client.go:787> Read error &{{0xc0000a4700}} 10.43.121.19:80 0 : read tcp 10.42.0.169:35854->10.43.121.19:80: read: connection reset by peer
06:55:29 E http_client.go:787> Read error &{{0xc0000a4800}} 10.43.121.19:80 0 : read tcp 10.42.0.169:35856->10.43.121.19:80: read: connection reset by peer
06:55:29 E http_client.go:787> Read error &{{0xc0000a4900}} 10.43.121.19:80 0 : read tcp 10.42.0.169:35858->10.43.121.19:80: read: connection reset by peer
06:55:29 E http_client.go:787> Read error &{{0xc0000a4a00}} 10.43.121.19:80 0 : read tcp 10.42.0.169:35860->10.43.121.19:80: read: connection reset by peer
06:55:29 E http_client.go:787> Read error &{{0xc0000a4c00}} 10.43.121.19:80 0 : read tcp 10.42.0.169:35864->10.43.121.19:80: read: connection reset by peer
06:55:29 E http_client.go:787> Read error &{{0xc0000a4b00}} 10.43.121.19:80 0 : read tcp 10.42.0.169:35862->10.43.121.19:80: read: connection reset by peer
06:55:29 E http_client.go:787> Read error &{{0xc000294200}} 10.43.121.19:80 0 : read tcp 10.42.0.169:35868->10.43.121.19:80: read: connection reset by peer
06:55:29 E http_client.go:787> Read error &{{0xc0003be280}} 10.43.121.19:80 0 : read tcp 10.42.0.169:35866->10.43.121.19:80: read: connection reset by peer
06:55:29 E http_client.go:787> Read error &{{0xc000294300}} 10.43.121.19:80 0 : read tcp 10.42.0.169:35872->10.43.121.19:80: read: connection reset by peer
06:55:29 E http_client.go:787> Read error &{{0xc0000a4d00}} 10.43.121.19:80 0 : read tcp 10.42.0.169:35870->10.43.121.19:80: read: connection reset by peer
Ended after 17.694162ms : 30 calls. qps=1695.5
Aggregated Function Time : count 30 avg 0.0007974482 +/- 0.0009519 min 0.000205009 max 0.005155331 sum 0.023923446
# range, mid point, percentile, count
>= 0.000205009 <= 0.001 , 0.000602504 , 66.67, 20
> 0.001 <= 0.002 , 0.0015 , 96.67, 9
> 0.005 <= 0.00515533 , 0.00507767 , 100.00, 1
# target 50% 0.000790792
# target 75% 0.00127778
# target 90% 0.00177778
# target 99% 0.00510873
# target 99.9% 0.00515067
Sockets used: 21 (for perfect keepalive, would be 3)
Jitter: false
Code  -1 : 20 (66.7 %)
Code 200 : 10 (33.3 %)
Response Header Sizes : count 30 avg 105.33333 +/- 149 min 0 max 316 sum 3160
Response Body/Total Sizes : count 30 avg 279 +/- 394.6 min 0 max 837 sum 8370
All done 30 calls (plus 0 warmup) 0.797 ms avg, 1695.5 qps

结果中-1状态码的错误率为66.7%

当我将spec.ports.name字段中定义了名字为不包含tcp字段的名字时,结果是正常的

06:15:23 I logger.go:127> Log level is now 3 Warning (was 2 Info)
Fortio 1.17.1 running at 0 queries per second, 4->4 procs, for 30 calls: http://10.43.184.166:80/get
Starting at max qps with 3 thread(s) [gomax 4] for exactly 30 calls (10 per thread + 0)
06:15:23 W http_client.go:806> [2] Non ok http code 503 (HTTP/1.1 503)
06:15:23 W http_client.go:806> [0] Non ok http code 503 (HTTP/1.1 503)
06:15:23 W http_client.go:806> [2] Non ok http code 503 (HTTP/1.1 503)
06:15:23 W http_client.go:806> [0] Non ok http code 503 (HTTP/1.1 503)
06:15:23 W http_client.go:806> [2] Non ok http code 503 (HTTP/1.1 503)
06:15:23 W http_client.go:806> [0] Non ok http code 503 (HTTP/1.1 503)
06:15:23 W http_client.go:806> [2] Non ok http code 503 (HTTP/1.1 503)
06:15:23 W http_client.go:806> [0] Non ok http code 503 (HTTP/1.1 503)
06:15:23 W http_client.go:806> [2] Non ok http code 503 (HTTP/1.1 503)
06:15:23 W http_client.go:806> [0] Non ok http code 503 (HTTP/1.1 503)
06:15:23 W http_client.go:806> [2] Non ok http code 503 (HTTP/1.1 503)
06:15:23 W http_client.go:806> [0] Non ok http code 503 (HTTP/1.1 503)
06:15:23 W http_client.go:806> [2] Non ok http code 503 (HTTP/1.1 503)
06:15:23 W http_client.go:806> [0] Non ok http code 503 (HTTP/1.1 503)
06:15:23 W http_client.go:806> [2] Non ok http code 503 (HTTP/1.1 503)
06:15:23 W http_client.go:806> [0] Non ok http code 503 (HTTP/1.1 503)
06:15:23 W http_client.go:806> [2] Non ok http code 503 (HTTP/1.1 503)
06:15:23 W http_client.go:806> [0] Non ok http code 503 (HTTP/1.1 503)
06:15:23 W http_client.go:806> [2] Non ok http code 503 (HTTP/1.1 503)
06:15:23 W http_client.go:806> [0] Non ok http code 503 (HTTP/1.1 503)
Ended after 33.69454ms : 30 calls. qps=890.35
Aggregated Function Time : count 30 avg 0.001820394 +/- 0.002782 min 0.000512982 max 0.015534668 sum 0.054611819
# range, mid point, percentile, count
>= 0.000512982 <= 0.001 , 0.000756491 , 60.00, 18
> 0.001 <= 0.002 , 0.0015 , 80.00, 6
> 0.002 <= 0.003 , 0.0025 , 90.00, 3
> 0.004 <= 0.005 , 0.0045 , 96.67, 2
> 0.014 <= 0.0155347 , 0.0147673 , 100.00, 1
# target 50% 0.000914056
# target 75% 0.00175
# target 90% 0.003
# target 99% 0.0150743
# target 99.9% 0.0154886
Sockets used: 21 (for perfect keepalive, would be 3)
Jitter: false
Code 200 : 10 (33.3 %)
Code 503 : 20 (66.7 %)
Response Header Sizes : count 30 avg 76.7 +/- 108.5 min 0 max 231 sum 2301
Response Body/Total Sizes : count 30 avg 438.36667 +/- 279.1 min 241 max 834 sum 13151
All done 30 calls (plus 0 warmup) 1.820 ms avg, 890.4 qps

综上有两个问题:
1.请问结果中-1状态码是什么含义?
2.spec.ports.name字段中如果包含tcp字段是否与某些地方发生了冲突?