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

Best approach for handling master-slave replication? #319

Open
vladimir-stornest opened this issue Jun 17, 2021 · 1 comment
Open

Best approach for handling master-slave replication? #319

vladimir-stornest opened this issue Jun 17, 2021 · 1 comment

Comments

@vladimir-stornest
Copy link

vladimir-stornest commented Jun 17, 2021

I'm interested in scaling my Rails application with master-slave replication using Makra.

As I understand, when one of the servers fails, Makara will blacklist it so it won't send traffic to it. But what happens if the master server fails? Then Rails application won't work because it won't be able to do write operations.

I assume I need to install and configure repmgr for automated failover to promote the slave server to master. How will the application know that there is a new master server when the old server will still be hardcoded in the configuration file? Could pgBouncer help with this, and how?

Any feedback is appreciated!

@jeremy
Copy link
Contributor

jeremy commented Aug 23, 2021

Check out https://github.com/EnterpriseDB/repmgr/blob/master/doc/repmgrd-node-fencing.md to get started @vladimir-stornest. This is out of scope for Makara. Make backend recovery transparent from its point of view, so all it has to do is try to reconnect.

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

2 participants