4

We're attempting to set up a PostgreSQL cluster using streaming replication inside Kubernetes, but we'd prefer to avoid the trouble of going through the configuration of pgpool or any other SQL-aware load-balancers.

That being said, I'd like to ask whether it is a good idea at all to configure Spring Boot to use two datasources in the following way:

  • The first (@Primary) datasource would point towards the current PostgreSQL master and be used for read and write operations.
  • The second datasource would point towards a hot-standby replica and be used for read operations.

Provided that there are Kubernetes services that point to the current master and to the read replicas, and that failover is not automated, are there any risks in this approach?

1
  • we are also going for the exactly same architecture. But after coming across pgPool we thought to give it a try. But the difficult setup & configuration of PgPool is delaying our project. But still we are thinking of going with pgPool way only. Commented Dec 31, 2017 at 7:35

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.