4 ms·
Nice! Yeah really our first go at it so I’m sure we have room to improve. PgBouncer was on the same instance I’m assuming?
by chasers 3y ago
Nice! Yeah really our first go at it so I’m sure we have room to improve.
PgBouncer was on the same instance I’m assuming?
- jhgg 3y agonah we run a pool of common pgbouncers that route to the various postgres instances we run. they also run google's cloud sql proxy as well. it's actually haproxy -> pgbouncer -> cloud sql proxy -> postgres. everything but postgres runs on one machine. we use haproxy to load balance replica connections across different pgbouncer backends for replicas of the same db.
- chasers 3y agoHa! Wait but why Google Cloud SQL proxy too? If you are interested in connecting over this it would be great to connect… chase@supabase.com. We want to do load balancing too. Makes so much sense to do load balancing in the proxy.
- jhgg 3y agocloud sql proxy makes connecting to cloud managed postgres instances pretty simple/easy. honestly, we dont have a "great" reason other than, we set it up a long time ago, and it's continued to work haha. so pgbouncer connects to cloud sql proxy, which does the connection pooling concern.