Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simulating variable network conditions in tests

I'm writing an app on GAE/J with GWT. On my dev machines, things work perfectly - and RPCs always return successfully, and in the same order. When I deploy to appengine, some RPCs fail, and they often return in a different order.

How can a testing environment incorporate this kind of variability? Are there any good tools that can handle this for appengine?

like image 248
Riley Lark Avatar asked Nov 02 '10 00:11

Riley Lark


People also ask

How do you simulate network packet loss?

To simulate packet loss, you can use an open source tool called tc (traffic control). tc can be installed on any Linux host. With this tool you can introduce packet loss to a network interface, as well as increase in latency and round-trip time.

How do I simulate low bandwidth connections in Windows?

To do this, click on the three vertical dots and then click on the middle dock position. Now go ahead and click on the Network tab. On the right, you should see a label called No Throttling. If you click on that, you'll get a dropdown list of a pre-configured speeds that you can use to simulate a slow connection.

How can I test if my network is slow?

The first thing you need to do if you think your network is going slowly is to check your current network latency. Using Windows, you can open a command prompt and type tracert followed by the destination you'd like to query, such as cloud.google.com.


1 Answers

NIST Net is a mature network emulator.

Quiting from their site:

The NIST Net network emulator is a general-purpose tool for emulating performance dynamics in IP networks. The tool is designed to allow controlled, reproducible experiments with network performance sensitive/adaptive applications and control protocols in a simple laboratory setting. By operating at the IP level, NIST Net can emulate the critical end-to-end performance characteristics imposed by various wide area network situations (e.g., congestion loss) or by various underlying subnetwork technologies (e.g., asymmetric bandwidth situations of xDSL and cable modems).

like image 151
Giacomo Verticale Avatar answered Sep 21 '22 08:09

Giacomo Verticale