Requirements ... Ruby 2.7 and later Damn. This looked interesting right up until the Ruby requirement. :(
How is this valid criticism? This is an excellent use of a scripting language.
But it's a nice tool anyway.
61–63 of 63 posts
Requirements ... Ruby 2.7 and later Damn. This looked interesting right up until the Ruby requirement. :(
How is this valid criticism? This is an excellent use of a scripting language.
But it's a nice tool anyway.
Earlier quoted context omitted.
Simple LB like Haproxy works fine for this and similar cases. In very nutshell, Haproxy executes checks every n seconds (in your case it can be readonly mode checks ) and disables that upstream. We use it over Mysql/Pg+patroni/Redis and works fine - we made tests for low load though, just up to 5k qps fot PG case and up to 80k rps for Redis case.
This can be done with pgbouncer and you can suspend the database so pgbouncer "holds" connections. If the application has high enough timeouts, it will look like it's just taking longer than normal to connect.
On a wider scale, Haproxy adds value - auto tracking on sync/async replicas, replica lag windows, falling back on master if all replicas lagging/down, so on.
There is also a new (OpenSource) Postgres extension that claims to provide multi-master replication based on logical replication, BDR and pglogical https://pgedge.github.io/spock/ which can also be used for online upgrades. It however only supports Postgres 15 and (not yet released) 16
It is under the Confluent license (with s/confluent/pgedge/), basically a source-available-but-Amazon-cannot-use-it kind of license.