8 ms·
nah 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 haprox
by jhgg 4y ago
nah 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 4y 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 4y 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.