This project simulates a scenario wherein a few frontends running groupcache are fronting a slow database. See my blog post about it for more details.
The following commands will set up this topology:
git clone [email protected]:capotej/groupcache-db-experiment
sh build.sh
cd dbserver && ./dbserver
This starts a delibrately slow k/v datastore on :8080
cd frontend
./frontend -port 8001
./frontend -port 8002
./frontend -port 8003
cd cli
./cli -set -key foo -value bar
./cli -get -key foo
should see bar in 300 ms./cli -cget -key foo
should see bar in 300ms (cache is loaded)./cli -cget -key foo
should see bar instantly