During exploration of high availability (HA) features of Windows Server AppFabric Distributed Cache I needed to generate enough load in a short timeframe. You know, to kill a couple of servers.
This is what came out of it.
It's a simple command line tool, allowing you to:
- Add millions of objects of arbitrary size to the cache cluster (using cache.Add())
- Put objects of arbitraty size to cache cluster
- Get objects back
- Remove objects from cache
- Has cluster support
- Has local cache support
- Will list configuration
- Will max out you local processors (using .NET 4 Parallel.For())
- Will perform graceously, even in times of trouble
I talked about this at a recent Users Group meeting, doing a live demo of cache clusters under load.
Typical usage scenario is:
- Configure a HA cluster
Remember, 3 nodes minimum, Windows Server 2008 (R2) Enterprise or DataCenter
- Configure a HA cache
- Edit App.config, list all available servers
- Connect to cluster
- Put a bunch of large objects (generate load)
Since AppFabric currently supports only partitioned cache type, this will distribute load among all cluster hosts. Thus, all hosts will store 1/N percent of objects.
- Stop one node
- Get all objects back
Since cache is in HA mode, you will get all your objects back, even though a host is down - cluster will redistribute all the missing cache regions to running nodes.
You can download the tool here.