Categorygithub.com/cirello-io/groupcache-experiment
modulepackage
0.0.0-20240903055353-d325ad71cb4f
Repository: https://github.com/cirello-io/groupcache-experiment.git
Documentation: pkg.go.dev

# README

Groupcache DB Experiment - Revisited 2019

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.

Getting it running

The following commands will set up this topology: groupcache topology

Build everything

  1. git clone https://github.com/cirello-io/groupcache-experiment.git
  2. go build ./cmd/backend
  3. go build ./cmd/frontend
  4. go build ./cmd/cli

Start DB server

  1. ./backend

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

Start Multiple Frontends

  1. ./frontend -listen "http://localhost:8001" -frontend "localhost:9001"
  2. ./frontend -listen "http://localhost:8002" -frontend "localhost:9002"
  3. ./frontend -listen "http://localhost:8003" -frontend "localhost:9003"

Use the CLI to set/get values

  1. ./cli -set -k foo -v bar
  2. ./cli -get -k foo should see bar in 300 ms
  3. ./cli -get -k foo should see bar instantly

# Packages

No description provided by the author
No description provided by the author