We have master (write-read) and slave (readonly) Postgres 10 databases. Slave is online replication from master.
Now our application (c# webapi) connects to master only directly. We want to execute all SELECT queries on slave to distribute load among our hardware.
- Idea is add some connection pooler that will pass all SELECTS on slave, other queries pass to master
- If replication falls down, it will detect that automatically ASAP and pass all SELECTS to master till replication online again.
Is pgbouncer ok for that? Some another tool?