Simulating Network Latency On Osx
When developing websites and such its good to know how loading will perform for users with slow/laggy connections. On FreeBSD or OSX you can model this using ipfw.
This will add a 300ms latency and a 50kBytes/s bandwidth restriction to our app running on localhost:4000. Finaly we can delete the restrictions using the following command to delete the pipes we setup.