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

PCR: enable simultaneous r/w ops on primary and backup clusters #130070

Closed
wuwo1952368901 opened this issue Sep 4, 2024 · 3 comments
Closed

PCR: enable simultaneous r/w ops on primary and backup clusters #130070

wuwo1952368901 opened this issue Sep 4, 2024 · 3 comments
Assignees
Labels
A-disaster-recovery C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) O-community Originated from the community T-disaster-recovery X-blathers-triaged blathers was able to find an owner

Comments

@wuwo1952368901
Copy link

wuwo1952368901 commented Sep 4, 2024

At present, physical cluster replication can only be synchronized from the primary cluster to the backup cluster.
But in the event of a failure in the main cluster, commands still need to be executed to handle cluster switching.
In practical use, we prefer that the primary and backup clusters can perform read and write operations simultaneously, so that in the event of a failure in the primary cluster, only the database configuration of the application needs to be modified without the need to switch databases through redundant commands.

Jira issue: CRDB-41863

@wuwo1952368901 wuwo1952368901 added the C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) label Sep 4, 2024
Copy link

blathers-crl bot commented Sep 4, 2024

Hello, I am Blathers. I am here to help you get the issue triaged.

It looks like you have not filled out the issue in the format of any of our templates. To best assist you, we advise you to use one of these templates.

I have CC'd a few people who may be able to assist you:

  • @cockroachdb/disaster-recovery (found keywords: backup)

If we have not gotten back to your issue within a few business days, you can try the following:

  • Join our community slack channel and ask on #cockroachdb.
  • Try find someone from here if you know they worked closely on the area and CC them.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@blathers-crl blathers-crl bot added A-disaster-recovery O-community Originated from the community X-blathers-triaged blathers was able to find an owner T-disaster-recovery labels Sep 4, 2024
Copy link

blathers-crl bot commented Sep 4, 2024

cc @cockroachdb/disaster-recovery

@ZhouXing19 ZhouXing19 changed the title Physical cluster bidirectional replication PCR: enable simultaneous r/w ops on primary and backup cluster Sep 5, 2024
@ZhouXing19 ZhouXing19 changed the title PCR: enable simultaneous r/w ops on primary and backup cluster PCR: enable simultaneous r/w ops on primary and backup clusters Sep 5, 2024
@alicia-l2
Copy link

Thanks for this feedback! Responding to some of your comments:

But in the event of a failure in the main cluster, commands still need to be executed to handle cluster switching.

Commands are executed from the standby cluster, so in the event of a cluster failure, you would use the standby cluster's SQL shell to initiate the cutover. See docs on how to initiate this here.

In practical use, we prefer that the primary and backup clusters can perform read and write operations simultaneously, so that in the event of a failure in the primary cluster, only the database configuration of the application needs to be modified without the need to switch databases through redundant commands.

In PCR, you are correct in that you will have to initiate a manual cutover from the standby cluster.
We are currently working on asynchronous replication tooling that will enable read/write operations to be performed on both clusters so that the only the database config of the app needs to be modified. This is coming this fall 2024.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-disaster-recovery C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) O-community Originated from the community T-disaster-recovery X-blathers-triaged blathers was able to find an owner
Projects
None yet
Development

No branches or pull requests

2 participants