0

Maybe a stupid question but I usually install two instances of my postgres database in a master - slave architecture (like this, if you need more details).

When configuring hasura, though, I see only one environment variable carrying the url to the database (e.g. here).

From the documentation, I understand that my master-slave database is more or less overkill or useless. Is that really the case? I would expect hasura to somehow be able to redirect read queries to the slave and write commands to the master. Is that possible today? Is it planned for a future release?

Laurent Michel
  • 1,069
  • 3
  • 14
  • 29
  • Do you have a single cluster IP? If so then hasura don't need to know is that a cluster or not - you configure connection to cluster IP. – Alex Yu Sep 13 '21 at 20:32

1 Answers1

1

Jelastic explanation of master-slave architectecture from OP question https://docs.jelastic.com/postgresql-database-replication/ looks strange for me: one component of HA architecture is missing - load balancer such as PgPool.

In case when master-slave instances are behind load balancer everything is the same as with single instance of postgresql.

Hasura connected to balancer, it don't know and don't need to know whether there are several instances or one.

Alex Yu
  • 3,412
  • 1
  • 25
  • 38