Skip to content

Commit

Permalink
fix circuit breaker guide
Browse files Browse the repository at this point in the history
Signed-off-by: Guy Daich <guy.daich@sap.com>
  • Loading branch information
guydc committed Feb 27, 2024
1 parent a46259d commit cabe1d0
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions site/content/en/latest/user/circuit-breaker.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ This instantiated resource can be linked to a [Gateway][], [HTTPRoute][] or [GRP

## Test and customize circuit breaker settings

This example will simulate a degraded backend that responds within 10 seconds by calling the `/delayed/10` endpoint of httpbin. The hey tool will be used to generate 100 concurrent requests.
This example will simulate a degraded backend that responds within 10 seconds by adding the `?delay=10s` query parameter to API calls. The hey tool will be used to generate 100 concurrent requests.

```shell
hey -n 100 -c 100 -host "www.example.com" http://${GATEWAY_HOST}/?delay=10s
Expand Down Expand Up @@ -72,7 +72,7 @@ spec:
targetRef:
group: gateway.networking.k8s.io
kind: HTTPRoute
name: httpbin
name: backend
namespace: default
circuitBreaker:
maxPendingRequests: 0
Expand All @@ -83,7 +83,7 @@ EOF
Execute the load simulation again.

```shell
hey -n 100 -c 100 -host "www.example.com" http://${GATEWAY_HOST}/delay/10
hey -n 100 -c 100 -host "www.example.com" http://${GATEWAY_HOST}/?delay=10s
```

```console
Expand Down Expand Up @@ -120,5 +120,4 @@ With the new circuit breaker settings, and due to the slowness of the backend, o
[Gateway]: https://gateway-api.sigs.k8s.io/api-types/gateway/
[HTTPRoute]: https://gateway-api.sigs.k8s.io/api-types/httproute/
[GRPCRoute]: https://gateway-api.sigs.k8s.io/api-types/grpcroute/
[Hey project]: https://github.com/rakyll/hey
[Httpbin project]: https://github.com/postmanlabs/httpbin
[Hey project]: https://github.com/rakyll/hey

0 comments on commit cabe1d0

Please sign in to comment.