Skip to content

Commit d9ddd86

Browse files
authored
Merge pull request #1307 from joshunrau/toxic-proxy
fix AI mistakes
2 parents aa84fce + e815ed0 commit d9ddd86

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

docs/en/2-tutorials/2.3-simulate-poor-network.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ This guide explains how to use the staged toxic proxy setup to simulate poor net
99

1010
When you run `scripts/toxic-proxy.sh`, it configures Toxiproxy with the following simulated network conditions:
1111

12-
- **Downstream bandwidth limit (API → browser):** capped at **5,000 bytes/second** (~5 KB/s).
13-
- **Upstream bandwidth limit (browser → API):** capped at **2,500 bytes/second** (~2.5 KB/s).
12+
- **Downstream bandwidth limit (API → browser):** capped at **5,000 KB/second** (~5 MB/s).
13+
- **Upstream bandwidth limit (browser → API):** capped at **2,500 KB/second** (~2.5 MB/s).
1414
- **Intermittent latency and jitter (downstream):**
1515
- Base latency of **50 ms**, plus up to **500 ms of jitter**.
1616
- Applied with **20% toxicity**, meaning only about 1 in 5 downstream requests/responses are delayed in this way.

scripts/toxic-proxy.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ sleep 1
3535

3636
toxiproxy-cli create --listen "0.0.0.0:$API_DEV_TOXIC_PROXY_PORT" --upstream "127.0.0.1:$API_DEV_SERVER_PORT" odc-api
3737

38-
toxiproxy-cli toxic add -n downstream-bandwidth -t bandwidth -a rate=5000 -a type=downstream odc-api
38+
toxiproxy-cli toxic add -n downstream-bandwidth -t bandwidth -a rate=5000 -a --downstream odc-api
3939

40-
toxiproxy-cli toxic add -n upstream-bandwidth -t bandwidth -a rate=2500 -a type=upstream odc-api
40+
toxiproxy-cli toxic add -n upstream-bandwidth -t bandwidth -a rate=2500 -a --upstream odc-api
4141

42-
toxiproxy-cli toxic add -n latency -t latency -a latency=50 -a jitter=500 -a type=downstream -toxicity 0.2 odc-api
42+
toxiproxy-cli toxic add -n latency -t latency -a latency=50 -a jitter=500 -a --downstream -toxicity 0.2 odc-api
4343

44-
toxiproxy-cli toxic add -n random-resets -t reset_peer -a type=tox_type=downstream -toxicity 0.1 odc-api
44+
toxiproxy-cli toxic add -n random-resets -t reset_peer -a --downstream -toxicity 0.1 odc-api
4545

4646
wait "$TOXIPROXY_PID"
4747

0 commit comments

Comments
 (0)