docs: optimizing api-breaker documentation (#6219)

This commit is contained in:
Baoyuan 2022-01-28 11:04:34 +08:00 committed by GitHub
parent 5f6d16041f
commit 3f7aaff1a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 5 deletions

View File

@ -80,8 +80,13 @@ curl "http://127.0.0.1:9080/apisix/admin/routes/1" -H 'X-API-KEY: edd1c9f034335f
}
}
},
"upstream": {
"type": "roundrobin",
"nodes": {
"127.0.0.1:1980": 1
}
},
"uri": "/hello",
"host": "127.0.0.1",
}'
```
@ -90,7 +95,7 @@ curl "http://127.0.0.1:9080/apisix/admin/routes/1" -H 'X-API-KEY: edd1c9f034335f
Then. Like the configuration above, if your upstream service returns 500. 3 times in a row. The client will receive a 502 (break_response_code) response.
```shell
$ curl -i -X POST "http://127.0.0.1:9080/get"
$ curl -i -X POST "http://127.0.0.1:9080/hello"
HTTP/1.1 502 Bad Gateway
Content-Type: application/octet-stream
Connection: keep-alive

View File

@ -79,8 +79,13 @@ curl "http://127.0.0.1:9080/apisix/admin/routes/1" -H 'X-API-KEY: edd1c9f034335f
}
}
},
"uri": "/hello",
"host": "127.0.0.1"
"upstream": {
"type": "roundrobin",
"nodes": {
"127.0.0.1:1980": 1
}
},
"uri": "/hello"
}'
```
@ -89,7 +94,7 @@ curl "http://127.0.0.1:9080/apisix/admin/routes/1" -H 'X-API-KEY: edd1c9f034335f
使用上游的配置,如果你的上流服务返回 500连续 3 次。客户端将会收到 502break_response_code应答。
```shell
$ curl -i "http://127.0.0.1:9080/get"
$ curl -i "http://127.0.0.1:9080/hello"
HTTP/1.1 502 Bad Gateway
Content-Type: application/octet-stream
Connection: keep-alive