experimenting with groupcache
Go Shell
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
api
cli
client
dbserver
frontend
slowdb
.gitignore
README.markdown
build.sh
topology.png

README.markdown

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: groupcache topology

Build everything

  1. git clone git@github.com:capotej/groupcache-db-experiment
  2. sh build.sh

Start DB server

  1. cd dbserver && ./dbserver

This starts a delibrately slow k/v datastore on :8080

Start Multiple Frontends

  1. cd frontend
  2. ./frontend -port 8001
  3. ./frontend -port 8002
  4. ./frontend -port 8003

Use the CLI to set/get values

  1. cd cli
  2. ./cli -set -key foo -value bar
  3. ./cli -get -key foo should see bar in 300 ms
  4. ./cli -cget -key foo should see bar in 300ms (cache is loaded)
  5. ./cli -cget -key foo should see bar instantly