mirror of
https://gitee.com/iresty/apisix.git
synced 2024-12-12 11:55:28 +08:00
docs: optimizing api-breaker documentation (#6219)
This commit is contained in:
parent
5f6d16041f
commit
3f7aaff1a8
@ -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
|
||||
|
@ -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 次。客户端将会收到 502(break_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
|
||||
|
Loading…
Reference in New Issue
Block a user