-
Notifications
You must be signed in to change notification settings - Fork 825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cascade replicaiton in openshift in case of failover #984
Comments
I suppose this issue has something common with #422 but with more specific cluster configuration. I suppose we can see this as label on pod with role (like existing master/replica but more specific like main replica/second replica) and setup chain of priorities like [second replica, main replica, master]. On the other side if |
Like it is proposed in the #422, we can introduce a new tag with the name for example What should be the behavior of untagged nodes? Right now they always replicate from the master.
There is actually another important question, how to chose the cascading replica to stream from? Is the random good enough? Or we should somehow load-balance across them? What should be the behavior if the number of cascading replicas increases? Should other replicas rebalance automatically to start streaming from the new node? |
I think cascade replication depends on hardware or/and network. For example I can allow 1>2>3>4 but dont want 1>3>2>4 because 3 and 4 are in different network or have slower disks. So I prefer 1>2>3>4 or 1>3>4 or 1>2>4. So it will be nice to have mechanism which will allow us to select replication source with internal knowledge in mind. |
Well, the thing is, that the current mechanism allows exactly this, every node could specify which node it wants to replicate from. |
We can specify it during start but cannot change it if some node failed. For example if we have 1>2>3>4 and 2 was damaged or cannot start replication or anything else (but pod 2 still alive) we cannot change to 1>3>4 without external orchestrator which will restart pods 3 and 4 with new tag in mind. Patroni will handle situation in some cases (for example if pod with node2 will be removed). Examples:
So current mechanism assumes patroni over patroni or manual operations. I suppose one of options is to mimic mechanics of bootstrap when patroni has default behaviour but allows to setup custom bootstrap method. |
That's sad but true.
Yeah, this is really how it is programmed to work. Complex topologies are not easy to describe. If you come up with a nice way of describing such topologies we would be very happy to support it. |
Without fixed names and roles it will be hard to describe such topology. I can design algorithm for our topology but cannot generalize it for any possible. My best proposal - extension point with default implementations like this:
For |
I want to implement this feature so it will be nice to come to agreement so we can sync branches in future. |
Cascade replication without specific |
We tried to setup cascade replication in openshift and find several problems:
replicatefrom
tag requires members name but it is name of pod and it can be changed after DeploymentConfiguration change or VM restart or whatever. It's small concern because patroni will use master instead and cluster will survive but still requires reconfiguration from outside of patroni sooner or later to recover cascade replication.Is there a safe method to setup cascade replication 1>2>3 and make sure everything will work fine even if any of pods will freeze or die? May be we can hack method
patroni.ha.Ha#_get_node_to_follow
to propose node for replicaiton instead of static tag?The text was updated successfully, but these errors were encountered: