Skip to content

Latest commit

 

History

History
62 lines (40 loc) · 920 Bytes

README.md

File metadata and controls

62 lines (40 loc) · 920 Bytes

key-value-server-go

Key-Value server in Go, JSON file disk persistence, non-blocking concurrent operations

Pre-requisites

You'll need to install:

Launch

Using go:

go run . -release

Send a key-value pair {"1":"1"}:

curl -s -X POST http://localhost:8080/key/1 -d "1"

Retrieve the value for key /key/1:

curl -s http://localhost:8080/key/1

Delete the value for key /key/1:

curl -X DELETE -s http://localhost:8080/key/1

How to build

Using go:

go build

How to test

Using go:

go test 

How to loadtest

Using K6

k6 run --vus 200 ./testdata/k6_get_loadtest.js --duration 60s
k6 run --vus 200 ./testdata/k6_post_loadtest.js --duration 60s
k6 run --vus 200 ./testdata/k6_delete_loadtest.js --duration 60s