WAN Emulator for Availability Group Testing

I had an unmet need to be able to test my AlwaysOn Availability Groups under less than ideal network conditions.  More specifically I needed a way to add network latency in order to create more realistic monitoring and troubleshooting scenarios.

After some searching, I found the WANem project on SourceForge.  WANem comes in two flavors: a live CD based on Knoppix and a virtual appliance to run under VMWare.  For my project I chose the live CD and ran it on an old laptop.  One very nice thing about WANem is that you only need a single network adapter on your test machine.

The documentation is quite adequate to get started, however I would recommend that you use this guide to set up your testing environment.  For my setup I added static routes so that the route between each server used the IP address of the WANem as its default gateway.

With the WAN emulator inserted into my test lab, my Availability Group lab setup logically looks like this:

Dialing in a network latency of 30 milliseconds easily causes the asynchronous secondary to fall behind.  One can easily see the send queue values ramp up

 

This entry was posted in Open Source, SQL Server and tagged , , , , . Bookmark the permalink.