3

I have a PostgreSQL DB running in Google Cloud SQL that I need to scale horizontally. Cloud SQL makes it easy to add read-only replicas, but does nothing to help with load-balancing traffic to the replicas.

I'm looking for something that will help me with load-balancing between the replicas. My app is running in Kubernetes (on GKE in the same cloud project as the database) so if the solution can be deployed to Kubernetes that would be great.

There's lots of good tutorials for doing this using ProxySQL but they all assume you are using MySQL, and the ProxySQL config file seems to have MySQL specific fields, but I haven't found anything that explicitly says "you can't use ProxySQL with PostgreSQL" or "ProxySQL does work with PostgreSQL, and here's how to do it..."

So my question is can I use ProxySQL with PostgreSQL? If so, what would the config file look like? If not what equivalent can I use instead?

2 Answers 2

1
+50

As far I know, ProxySQL works only with MySQL(e.g. MariaDB, Percona and e.t.c.). May be SQLRelay would be suitable for you.

1

Have you looked at YugabyteDB - it is a PostgreSQL compatible, distributed SQL database that enables easy horizontal scaling across VMs or PODs in K8S.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .