cockroachdb_pool 1.1.0+1
cockroachdb_pool: ^1.1.0+1 copied to clipboard
CockroachDB connection pool with automatic cluster load balancing.
A library to control a maximized number of connections to a CockroachDB cluster server.
Features:
- Scans nodes list (via HTTP API) periodically, automatically add/remove nodes.
- On critical errors or elevated timeouts it marks the node as bad and uses other nodes instead.
Discontinued #
package:postgres from ^3.0.0 supports connection pooling as part of the core
library. Development and advanced pooling support will be migrated to that package.
Usage #
Once you've created the CrdbPool object, you can:
- Use it as
PostgreSQLExecutionContext(frompackage:postgres). - Use it as
PgPool(frompackage:postgres_pool). - Use
CrdbPool.runfor non-transactional batches with optional retry. - Use
CrdbPool.runTxfor transactional batches with optional retry.