Caching on read replica of a data source

I am using metabase to connect to a relational postgres db.

Caching feature is pretty important to my usecase, to keep loading times bearable for end users.

Another constraint I'd like to achieve is directing all traffic coming from metabase to a read replica, to avoid eating up CPU of the main database server.

However, I can see that caching needs write access on the source database, and connecting to a read replica doesn't allow writes in most cloud providers. (I am using gcp cloud sql).

Is there a possibility to work around this?
It would be great if metabase can accept two ips for each source, one for read queries, and the other for writes.

1 Like

we talked about this with the product team recently, this might come in the future, but right now you need to connect to the writer node to make caching work

This is something we would also really like to see :slight_smile:

1 Like

This is an essential feature for any growing organisation using Metabase, we are facing the exact same issue.

you can implement this right now using pgpool if you need it right now
https://www.pgpool.net/docs/latest/en/html/runtime-config-load-balancing.html