S

spqr

Категория проекта: Ожидает модерации

Форк от postgres / spqr

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, and can be run using make run. Also, there are stress tests, but it a work in progress. For more information on testing, please see test and stress section in Makefile.

License

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