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

[DOCS] CCR disaster recovery #91491

Merged
merged 30 commits into from
Apr 21, 2023
Merged

[DOCS] CCR disaster recovery #91491

merged 30 commits into from
Apr 21, 2023

Conversation

Leaf-Lin
Copy link
Contributor

@Leaf-Lin Leaf-Lin commented Nov 10, 2022

Similar to #87099, we should also have a tutorial page for bi-directional disaster recovery.

This is similar to the blog: https://www.elastic.co/blog/bi-directional-replication-with-elasticsearch-cross-cluster-replication-ccr, but it broadens the use case with modernized elasticserach feature (data stream). It also contains:

  • ccr auto_follow pattern
  • logstash load balancing

And provide updates and delete instructions.

@github-actions
Copy link
Contributor

Documentation preview:

@Leaf-Lin Leaf-Lin added >docs General docs changes :Distributed Indexing/CCR Issues around the Cross Cluster State Replication features labels Nov 10, 2022
@Leaf-Lin Leaf-Lin requested a review from debadair November 10, 2022 07:08
@Leaf-Lin Leaf-Lin marked this pull request as ready for review November 10, 2022 07:09
@elasticsearchmachine elasticsearchmachine added Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. Team:Docs Meta label for docs team labels Nov 10, 2022
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-docs (Team:Docs)

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (Team:Distributed)

@kingherc kingherc added v8.7.0 and removed v8.6.0 labels Nov 16, 2022
Remove immutable restrictions and add update/delete by query instructions.
Copy link
Contributor

@amyjtechwriter amyjtechwriter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - really awesome tutorials

@Leaf-Lin
Copy link
Contributor Author

Copy link
Contributor

@henningandersen henningandersen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few comments, otherwise this looks good.

Also, what do you think about @naj-h 's concern in #91491 (comment)

I think it is worth mentioning too. For uni-directional it is somewhat outside the story's main path in that this does not concern a DR but rather the DR-site being unavailable. So some mention towards the bottom makes most sense to me.

In the bi-directional case it is more troubling. I think you'll need to mention the error you can get and then how to remedy (delete and re-bootstrap).

I think we should not advice to set the setting higher (has other consequences). Perhaps not mention it directly but link to the documentation for it.

[source,console]
----
### On the cluster identified from the previous step ###
POST logs-generic-default/_update_by_query
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would they not simply use individual updates or deletes instead (maybe through bulk)? I can imagine the query above giving out documents that are on both sides and they'd have to partition the document _id to use on each cluster.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another common request from users is to perform update or deletes in bi-directional CCR.

The purpose of this section is to demonstrate the possibility of doing so. Users are still welcome to bulk delete/update on the leader index as they wish.

+
[source,logstash]
----
### On Logstash server ###
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would logstash not be a single point of failure?

I think the original blog post would index data locally in the current DC to the local cluster, avoiding this issue to some degree.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly. Unfortunately, the original blog post having DC locality isolation does not satisfy most of the bi-directional CCR use cases where users would have a single source of ingestion going into two separated cluster. That's part of the reason I was working on this tutorial to highlight this use case.

There are other possibility avoiding Logstash being the single point of failure, but it is outside the scope of this tutorial.

@amyjtechwriter
Copy link
Contributor

@elasticmachine merge upstream

@amyjtechwriter
Copy link
Contributor

@elasticmachine update branch

@amyjtechwriter
Copy link
Contributor

@elasticmachine run elasticsearch-ci/docs-check

@amyjtechwriter
Copy link
Contributor

@elasticmachine test this please

@abdonpijpelink
Copy link
Contributor

@elasticmachine retest this please

@amyjtechwriter amyjtechwriter merged commit 8c06aea into main Apr 21, 2023
@amyjtechwriter amyjtechwriter deleted the Leaf-Lin-bi-directional-DR branch April 21, 2023 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed Indexing/CCR Issues around the Cross Cluster State Replication features >docs General docs changes Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. Team:Docs Meta label for docs team v8.8.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants