Skip to content

Latest commit

 

History

History
25 lines (19 loc) · 1020 Bytes

README.md

File metadata and controls

25 lines (19 loc) · 1020 Bytes

cockroach-test-drive

Goal: demo a sample golang service using a cockroach cluster, testing and monitoring rolling database restarts.

Steps:

  • docker-compose cluster with containers:
    • 3 identical cockroach nodes with persistent volumes on host
    • golang microservice using lib/pq doing continuous reads and writes
    • prometheus monitoring database and service nodes
    • grafana graphing everything
  • control mechanism to stop/start db nodes on demand
    • sometimes regaining persistent volumes
    • sometimes losing persistent volumes
    • measure recovery time in both cases
    • measure application reaction

Questions

How easy is it to write unit/integration tests against Cockroach?

Check out github.com/cockroachdb/cockroach-go/testserver

How do we make the Postgres client aware of multiple servers?