toxiproxy
toxiproxy copied to clipboard
bandwidth - is it possible to limit the the upload speed?
Hi quick question
Example: create a proxy for an webapp like
toxiproxy-cli create myapp -l localhost:7777 -u localhost:5555
toxiproxy-cli toxic add myapp -t bandwidth -n speed -a rate=500
Now when I run the webapp locally and point my browser at localhost:7777
the bandwidth rate it seems to limit only the download speed but not the upload speed
Is it possible to limit also the upload speed using toxiproxy?
You can add the --upstream parameter to the end. --downstream works too.
toxiproxy-cli toxic add myapp -t bandwidth -n speed -a rate=500 --upstream
@hwvs Thank you for the reply I looked at the README and found this paragraph
The stream direction must be either upstream or downstream. upstream applies the toxic on the client -> server connection, while downstream applies the toxic on the server -> client connection. This can be used to modify requests and responses separately.
I've seen it before but as I did not find an example with --upstream I did realize that I can use it as an option (there are downstream examples but without --downstream option as it is the default one) I think it might be useful to add one verbose example with the options set to the documentation