groupcache-db-experiment
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.
Getting it running
The following commands will set up this topology:
Build everything
git clone [email protected]:capotej/groupcache-db-experiment
sh build.sh
Start DB server
cd dbserver && ./dbserver
This starts a delibrately slow k/v datastore on :8080
Start Multiple Frontends
cd frontend
./frontend -port 8001
./frontend -port 8002
./frontend -port 8003
Use the CLI to set/get values
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