supavisor
pgbouncer
supavisor | pgbouncer | |
---|---|---|
15 | 34 | |
1,591 | 2,656 | |
1.8% | 1.8% | |
8.9 | 8.7 | |
2 days ago | 3 days ago | |
Elixir | C | |
Apache License 2.0 | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
supavisor
-
PostgreSQL Is Enough
WalEx instead of pub/sub (listen/subscribe): https://github.com/cpursley/walex
Supavisor connection pooler: https://github.com/supabase/supavisor
-
Introducing Read Replicas
To make use of your read replicas, copy your connection string for the read replica, update your apps to use the new read replica and you are done! A unique connection pool is also provisioned for each read replica via Supavisor.
-
Supavisor 1.0: a scalable connection pooler for Postgres
[I'm on the supabase team]
You can find the code/docs here: https://github.com/supabase/supavisor
This release adds support for
- SQL Parsing
- Load balancing
- support for named prepared statement
- query cancellation
It's also now available on all new databases in Supabase. For some more background on scalability, we have some benchmarks available here:
https://supabase.com/blog/supavisor-1-million
-
PgBouncer 1.21.0 released with prepared statement support
PgBouncer maintainer here, so obviously biased. But I think currently PgBouncer should still be the default connection pooler that you choose. There's a few newer options: Odyssey, pgcat, and supavisor. But all focus on a solving 1 or 2 specific problems that PgBouncer did not solve well, while not solving many of the other problems that PgBouncer does solve. So if you have the exact same requirements as the authors of those tools, then switching might be good. But otherwise you should probably continue using PgBouncer.
Supavisor specifically is really immature. It's missing some really core functionality like query cancellations: https://github.com/supabase/supavisor/issues/174
I did a talk on this exact topic at PGConf NYC recently. My slides are here: https://github.com/JelteF/slides/raw/main/2023-10-05-future-...
-
Supavisor: Scaling Postgres to 1 Million Connections
If you are interested in exploring Supavisor's potential or want to implement its scalability in your upcoming project, check out the GitHub repository to know more.
-
How to Listen to Database Changes Using Postgres Triggers in Elixir
Phoenix.PubSub is basically a noop service. It really just works. You should try it!
If discovering nodes is difficult in your env, try using a listen/notify libcluster strategy:
https://github.com/supabase/supavisor/blob/main/lib/cluster/...
-
The Database Package Manager for PostgreSQL Trusted Language Extensions
[2] https://github.com/supabase/supavisor
-
Supabase Logs: open source logging server
Supavisor
- Supavisor - Postgres connection pooler written in Elixir
- Supavisor - a Postgres connection pooler written in Elixir
pgbouncer
-
MongoDB and Load Balancer Support
Thanks to MongoDB drivers all consistently providing connection monitoring and pooling functionality, external connection pooling solutions aren't required (ex: Pgpool, PgBouncer). This allows applications built using MongoDB drivers to be resilient and scalable out of the box, but based on what we understand regarding the number of connections applications establish to MongoDB clusters it stands to reason that at a certain point as our application deployments increase, so will our connections.
-
Minha jornada de otimização de uma aplicação django
Pgbouncer - resolvia o problema do limite de conexões no postgres. Mas a API “saudável” manteve o número de conexões baixo o suficiente.
- PgBouncer 1.21.0 – "The one with prepared statements"
- Pgbouncer adds support for prepared statements
-
PgBouncer is useful, important, and fraught with peril
Pgbouncer maintainer here. Overall I think this is a great description of the tradeoffs that PgBouncer brings and how to work around/manage them. I'm actively working on fixing quite a few of the issues in this blog though
1. Named protocol-level prepared statements in transaction mode has a PR that's pretty close to being merged: https://github.com/pgbouncer/pgbouncer/pull/845
-
Supavisor: Scaling Postgres to 1 Million Connections
A common solution is connection pooling. Supabase currently offers pgbouncer which is single-threaded, making it difficult to scale. We've seen some novel ways to scale pgbouncer, but we have a few other goals in mind for our platform.
-
Citus 12: Schema-based sharding for PostgreSQL
Great observation! :)
We worked upstream to have `search_path` properly handled (tracked per client) by pgbouncer.
https://github.com/pgbouncer/pgbouncer/commit/8c18fc4d213ad4...
Check config.md in that commit for a verbose, humanized description.
What are some alternatives?
pgcat - PostgreSQL pooler with sharding, load balancing and failover support.
odyssey - Scalable PostgreSQL connection pooler
pg_tle - Framework for building trusted language extensions for PostgreSQL
asyncpg - A fast PostgreSQL Database Client Library for Python/asyncio.
mssql-changefeed
pgcat - PostgreSQL pooler with sharding, load balancing and failover support. [Moved to: https://github.com/postgresml/pgcat]
debezium - Change data capture for a variety of databases. Please log issues at https://issues.redhat.com/browse/DBZ.
TimescaleDB - An open-source time-series SQL database optimized for fast ingest and complex queries. Packaged as a PostgreSQL extension.
sql-examples - Curated list of SQL to help you find useful script easily 🚀
walex - Postgres change events (CDC) in Elixir
rds-auth-proxy - A "passwordless" login experience for your AWS RDS