←back to thread

125 points todsacerdoti | 1 comments | | HN request time: 0.001s | source
Show context
nvahalik ◴[] No.45040957[source]
When doing web development I will occasionally connect my local code base to a remote SQL server via SSH.

This adds enough latency to be noticeable and I’ve found pages that were “OK” in prod that were unbearable in my local environment. Most of the time it was N+1 queries. Sometimes it was a cache that wasn’t working as intended. Sometimes it simply was a feature that “looked cool” but offered no value.

I’m not sure if there is a proxy that would do this locally but I’ve found it invaluable.

replies(3): >>45041182 #>>45042663 #>>45042957 #
enlyth ◴[] No.45041182[source]
I'm a big fan of Toxiproxy for these kinds of things:

https://github.com/Shopify/toxiproxy

replies(2): >>45041439 #>>45041908 #
calebh ◴[] No.45041439[source]
I do networked game development on Windows and I've found the clumsy program to be very valuable to simulate adverse network conditions. You can set it up to simulate arbitrary network latency, packet loss and so forth.

https://jagt.github.io/clumsy/

replies(2): >>45042615 #>>45046576 #
1. DrillShopper ◴[] No.45042615{3}[source]
You can use the tc command from the netem package for those wondering how to achieve this on Linux. https://man7.org/linux/man-pages/man8/tc-netem.8.html