cockroachdb / docs

CockroachDB user documentation
https://cockroachlabs.com/docs
Creative Commons Attribution 4.0 International
184 stars 451 forks source link

Document using PGBouncer with CockroachDB #10222

Open RichardJCai opened 3 years ago

RichardJCai commented 3 years ago

Richard Cai (RichardJCai) commented:

I created a rough tutorial on using CRDB with PGBouncer / HAProxy but I think the goal is to make a more formal doc on it.

Reference: https://github.com/RichardJCai/crdb-pgbouncer/blob/main/README.md

In general it seems CRDB is compatible with PGBouncer however there may not be much benefit to using it as CRDB idle connections are relatively cheap (compared to PG). We can provide guidance stating that it is likely unnecessary to use but may be beneficial if there is an extremely high number of connections relative to the hardware specs and it's best that they test it themselves to determine if it's necessary to use.

Users can use PGBouncer if it provides application side benefits such as simplifying connection pooling.

Jira Issue: DOC-1077

RichardJCai commented 3 years ago

cc @ericharmeling for awareness

ericharmeling commented 3 years ago

@ianjevans

Follow-up on our very brief conversation re: connection pooling tests.

vy-ton commented 2 years ago

@ericharmeling or @ianjevans

The team discussed and we agreed that we should go ahead and add PgBouncer to the community tooling page with a link to https://dzone.com/articles/using-pgbouncer-with-cockroachdb. We can do this as a stopgap before investing in any more full fledged PgBouncer examples