You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On an application that I've been working on, we have a need for high availability and after discovering this gem I thought that it would be easy to implement, however I soon realised a limitation with this gem with the structure of our database setup.
Because of the need to have access to the latest data very quickly, we can't rely on replication happening before the next read, so we have all reads/writes happening on one box, with peer-to-peer replication setup between all databases. This way, if the one we're using fails, we can change connections to another and not lose anything, and just have a slight delay due to replication speeds (which we can live with in the event of a failure)
Unfortunately, seamless_database_pool only seems to allow for a master/slave configuration, with failover only applying on the slaves. In the event of the master failing, everything fails. Because our setup does not have a master, I was not able to use this gem.
Based on the code from this however I have created something that fits our needs, but it may be worth considering adding this type of functionality to this gem as it may be useful to others? Or perhaps modify it so that the entire thing doesn't fail if the 'master' fails, and a way of configuring it so that the other nodes are only used in the even of the master failing, and it then makes one of the other nodes the 'master' temporarily.
The text was updated successfully, but these errors were encountered:
On an application that I've been working on, we have a need for high availability and after discovering this gem I thought that it would be easy to implement, however I soon realised a limitation with this gem with the structure of our database setup.
Because of the need to have access to the latest data very quickly, we can't rely on replication happening before the next read, so we have all reads/writes happening on one box, with peer-to-peer replication setup between all databases. This way, if the one we're using fails, we can change connections to another and not lose anything, and just have a slight delay due to replication speeds (which we can live with in the event of a failure)
Unfortunately,
seamless_database_pool
only seems to allow for a master/slave configuration, with failover only applying on the slaves. In the event of the master failing, everything fails. Because our setup does not have a master, I was not able to use this gem.Based on the code from this however I have created something that fits our needs, but it may be worth considering adding this type of functionality to this gem as it may be useful to others? Or perhaps modify it so that the entire thing doesn't fail if the 'master' fails, and a way of configuring it so that the other nodes are only used in the even of the master failing, and it then makes one of the other nodes the 'master' temporarily.
The text was updated successfully, but these errors were encountered: