This is the second revision of Capotej's Groupcache DB Experiment.
I decided to replay again his experiment using newer techniques, such the use of go mod, protobuf and error wrapping.
This project simulates a scenario wherein a few frontends running groupcache are fronting a slow database. See his blog post about it for more details.
The following commands will set up this topology:
git clone https://github.com/cirello-io/groupcache-experiment.git
go build ./cmd/backend
go build ./cmd/frontend
go build ./cmd/cli
./backend
This starts a deliberately slow k/v datastore on :8080
./frontend -listen "http://localhost:8001" -frontend "localhost:9001"
./frontend -listen "http://localhost:8002" -frontend "localhost:9002"
./frontend -listen "http://localhost:8003" -frontend "localhost:9003"
./cli -set -k foo -v bar
./cli -get -k foo
should see bar in 300 ms./cli -get -k foo
should see bar instantly