-
Notifications
You must be signed in to change notification settings - Fork 825
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding image for debugging and traffic shaping
- Loading branch information
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
set -x | ||
|
||
# Adding artificial delay for all network calls. | ||
# In order to verify that there is a delay, you can login to the container and run: | ||
# > tc qdisc show dev eth0 | ||
# To change the delay inside of the running container, run: | ||
# > tc qdisc del dev eth0 root && tc qdisc add dev eth0 root netem delay 100ms | ||
# | ||
# Read more about what's possible with tc here: | ||
# https://www.badunetworks.com/traffic-shaping-with-tc/ | ||
if [ ! -z "$TEMPORAL_DBG_NETWORK_DELAY_MS" ]; then | ||
tc qdisc add dev eth0 root netem delay "${TEMPORAL_DBG_NETWORK_DELAY_MS}ms" | ||
fi |