Cube.js: Is Cubejs possible to connect to a set of postgres replicate set?

Created on 8 Jan 2020  路  3Comments  路  Source: cube-js/cube.js

In the need of connecting cubejs to a set of posgres replicate set for scaling and back-up stategy using multiple standby prosgres db instances, is it possible to connect cubejs to a set of posgres relicate set?

Posgres connection string looks like this:
postgresql://host1:123,host2:456/somedb?target_session_attrs=any&application_name=myapp

Thanks.

enhancement help wanted

All 3 comments

@thinhvo-groove Hey Thinh! Great question! Unfortunately there's no easy way to connect to Postgres cluster as there's no support in underlying node-posgres library which is used by driver: https://github.com/brianc/node-postgres/issues/1470. Is it for load balancing? I believe you can use something like HAProxy in front of postgres to do that: https://www.percona.com/blog/2019/11/08/configure-haproxy-with-postgresql-using-built-in-pgsql-check/

This issue is currently outside of our roadmap and we're looking for contributions here!

Was this page helpful?
0 / 5 - 0 ratings