failover
#196
Replies: 2 comments 6 replies
-
Failover happens when a write fails against the primary. You can setup pgagroal to run against a replica instance and only issue reads against it. The replica being promoted is chosen from the list of hosts in a "first-to-last" manner - excluding the failed primary of course. So, in your case it would be You can use the |
Beta Was this translation helpful? Give feedback.
6 replies
-
Thanks, it is clear now: I need different configurations. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've a doubt about the configuration for failover. According to the documentation https://agroal.github.io/pgagroal/failover.html, failover happens when "clients can't write to it" (a PostgreSQL instance). What does that mean? Because at first I was thinking about a server that goes in read-only mode, but than it could also be a failover because a cluster is not responding. Is such a case a "cannot write" scenario?
What is exactly that triggers the failover?
Moreover, what is selected as the new primary? I suspect the next cluster configured into the
pgagroal.conf
file, is that correct? Or better, is it the first not-primary host found? I mean, if I configurepgagroal
with something like:once the primary node fails, pgagroal is selecting the standby one, right? Assuming the standby is not getting promoted, or once promoted start failing itself, is
pgagroal
able to select the next one, that is "clone" in the above configuration?Beta Was this translation helpful? Give feedback.
All reactions