Skip to content
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

Suggestion: peer-to-peer failover #21

Open
pareeohnos opened this issue Aug 5, 2014 · 0 comments
Open

Suggestion: peer-to-peer failover #21

pareeohnos opened this issue Aug 5, 2014 · 0 comments

Comments

@pareeohnos
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant