Skip to content
/ spqr Public
forked from pg-sharding/spqr

Stateless Postgres Query Router

License

Notifications You must be signed in to change notification settings

diPhantxm/spqr

 
 

Repository files navigation

Go Go GitHub go.mod Go version Go Report

Stateless Postgres Query Router

SPQR is a system for horizontal scaling of PostgreSQL via sharding. We appreciate any kind of feedback and contribution to the project.

For more about SPQR, please see docs/ and benchmarks/.

Main features

  • Transaction and session pooling
  • Multiple routers for fault tolerance
  • Sharding
  • Liquid data migrations
  • Limited multi-shard queries
  • Works over PostgreSQL protocol
  • Falling unrouted queries to the world shard
  • Minor overhead for query execution
  • and, of course, TLS support

Development

You can use make run for a quick example using Docker. For local development, you need the latest Go version.

How to build:

make
make build

How to run:

spqr-router run -c path-to-router-config.yaml

Tests

SPQR has regression tests. These tests require Docker Compose, and can be run using make regress. Also, there are stress tests, but it's a work in progress. For more information on testing, please see test and stress sections in Makefile.

License

The SPQR source code is distributed under the PostgreSQL Global Development Group License.

About

Stateless Postgres Query Router

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • Go 86.7%
  • Gherkin 7.7%
  • Shell 2.1%
  • Yacc 1.4%
  • Makefile 0.7%
  • Dockerfile 0.7%
  • Other 0.7%