Skip to content

implementing as immutable as possible data modelization and benchmarking it on different platforms

License

Notifications You must be signed in to change notification settings

vincentserpoul/playwithsql

Repository files navigation

playwithsql Go Report Card Codacy Badge

implementing as immutable as possible data modelization and benchmarking it on different platforms.

Disclaimer

the benchmark comparison is for very specific use case:

  • Golang 1.8.3
  • Containerized DBs, latest versions
  • Specific schemas
  • Used configurations
  • GCP as cloud provider (or local, until docker for GCP is allowing experimental)
  • n1-standard-1 as machine type

Hence, they can't be used to affirm that this or this db is better. The context matters!

Results

Just check them here!

Tested dbs

  • MySQL
  • MariaDB
  • PerconaDB
  • Postgres
  • CockroachDB
  • SQLite
  • Microsoft SQL Server
  • Reference hosted MySQL on GCP
  • Reference hosted Postgres on GCP
  • Vitess
  • Cloud Spanner

Tested setups

  • local swarm cluster - local solo db container
  • swarm cluster - gcloud solo db container
  • kubernetes cluster - gcloud solo db container
  • swarm cluster - gcloud cluster db containers
  • kubernetes cluster - gcloud cluster db containers

Rebuilding the docker image

./build-docker-cmd-status.sh

Launch tests

./status/run-test.sh

Launch local status benches

./bench/status/swarm/run-all.sh (islatest or lateststatus or history)

Launch remote tests on kubernetes

./bench/status/kubernetes/run-all.sh (islatest or lateststatus or history)

TODO list

  • Bench 1000000 loops and get the best of 5 runs for each db
  • Test different storage (mounted standard disk, mounted ssd, local ssd)
  • Test High Availability
  • Leverage new go 1.8 capabilities (named queries, remove sqlx?)
  • Vendor deps (github.com/kardianos/govendor)