Skip to content

Document avoiding storage-level double replication - #387

Open
l4zy0n3 wants to merge 1 commit into
rancher:mainfrom
l4zy0n3:longhorn-ha-storage-docs
Open

l4zy0n3 wants to merge 1 commit into
rancher:mainfrom
l4zy0n3:longhorn-ha-storage-docs

Conversation

@l4zy0n3

@l4zy0n3 l4zy0n3 commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

What

Document Longhorn single-replica, strict-local storage for SUSE Observability components that already replicate their data at the application layer. Also gives a backend-neutral recommendation to avoid redundant storage-level replication.

Verified behavior

  • Global/component precedence rendered against the shipped 2.10.3 chart.
  • Fresh PVCs receive their selected StorageClass; existing PVCs cannot change StorageClass (Kubernetes rejects the mutation), so migration is forward-only until claims are recreated.
  • Sizing render matrix: NonHA profiles do not qualify; Kafka, Elasticsearch, ZooKeeper and HDFS DataNode qualify in HA; ClickHouse qualifies only in 4000-ha; NameNode/SecondaryNameNode never qualify.
  • Global StorageClass blast radius inventoried: 18 PVC-producing resources in 150-ha, including metadata, backups, caches, VictoriaMetrics, vmagent and workload-observer.
  • Longhorn full-node drain behavior previously verified: default policy blocks on instance-manager PDB; always-allow completes. Documentation links to Longhorn's own node failure, graceful removal, and drain-policy guidance.

Documentation scope

  • Longhorn is detailed because it was tested live.
  • Other storage backends get the same general recommendation, deferring exact configuration/recovery to their documentation.
  • Explains global routing, mandatory HDFS metadata overrides, ClickHouse profile override, RWX incompatibility, immutable existing PVCs, and sequential node maintenance.

@l4zy0n3
l4zy0n3 requested a review from a team as a code owner August 20, 2026 10:31
@netlify

netlify Bot commented Aug 20, 2026

Copy link
Copy Markdown

Deploy Preview for suse-obs ready!

Name Link
🔨 Latest commit 90f7ad3
🔍 Latest deploy log https://app.netlify.com/projects/suse-obs/deploys/6a8eba7e60675c00082bc814
😎 Deploy Preview https://deploy-preview-387--suse-obs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@l4zy0n3
l4zy0n3 force-pushed the longhorn-ha-storage-docs branch from c6823e8 to b007ebf Compare August 20, 2026 10:41
@l4zy0n3 l4zy0n3 changed the title Document reducing storage overhead on replicated storage backends Document node-drain caveat for single-replica storage classes Aug 20, 2026
@l4zy0n3
l4zy0n3 force-pushed the longhorn-ha-storage-docs branch from b007ebf to d9eeb3a Compare August 20, 2026 10:46
@l4zy0n3 l4zy0n3 changed the title Document node-drain caveat for single-replica storage classes Document using Longhorn with self-replicating components Aug 20, 2026
@l4zy0n3
l4zy0n3 force-pushed the longhorn-ha-storage-docs branch 2 times, most recently from cfbcf45 to 1912e1e Compare August 20, 2026 10:53

== Using Longhorn with self-replicating components

Kafka, ZooKeeper, ClickHouse, and HDFS DataNodes already replicate their data across pods/nodes at the application layer. If you run https://longhorn.io/[Longhorn] as your storage backend, its default StorageClass also replicates each volume (3 copies by default), multiplying storage usage on top of the application's own copies.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For elasticsearch we need a helm chart update I believe, right?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We should also include that this applies to an HA deployment. For non-ha deployments we do not recommend this strict-local setup but instead we might want to recommend a storage class with only the default replica count set to 2 instead of 3.

We could actually suggest that also for all other PVCs in HA: use another custom storage class with replicaCount: "2" (instead of 3) by setting it as the global.storageClass. WDTY?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

And we can include a link to Longhorn best practices:

See also Longhorn [IO Performance best practices](https://longhorn.io/docs/1.12.1/best-practices/#io-performance)


[NOTE]
====
`dataLocality: strict-local` is incompatible with `ReadWriteMany` volumes. Also, on Longhorn with `numberOfReplicas: 1`, draining that node hangs indefinitely by default -- set the https://longhorn.io/docs/latest/references/settings/#node-drain-policy[Node Drain Policy] to `always-allow` beforehand.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We should include a little bit more I think:

Suggested change
`dataLocality: strict-local` is incompatible with `ReadWriteMany` volumes. Also, on Longhorn with `numberOfReplicas: 1`, draining that node hangs indefinitely by default -- set the https://longhorn.io/docs/latest/references/settings/#node-drain-policy[Node Drain Policy] to `always-allow` beforehand.
`dataLocality: strict-local` is incompatible with `ReadWriteMany` volumes. Also, on Longhorn with `numberOfReplicas: 1`, draining that node hangs indefinitely by default -- set the https://longhorn.io/docs/latest/references/settings/#node-drain-policy[Node Drain Policy] to `always-allow` beforehand.
When removing or replacing a node follow the [Longhorn documentation](https://longhorn.io/docs/1.12.1/nodes-and-volumes/nodes/graceful-node-removal/) to do this 1 node at a time only, and wait for the data replication on the database level to have completed. Without waiting for replication to finish data is likely to be lost.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

They should also make sure to know what to do when a node fails (and the disk is lost). Also documented by Longhorn: https://longhorn.io/docs/1.12.1/high-availability/node-failure/

Document how HA components with application-level replication can avoid
storage-level double replication. Include the Longhorn strict-local
StorageClass, global routing with HDFS metadata-node overrides, the
ClickHouse profile restriction, PVC immutability during upgrades, and
one-node-at-a-time maintenance guidance.
@l4zy0n3
l4zy0n3 force-pushed the longhorn-ha-storage-docs branch from 1912e1e to 90f7ad3 Compare August 26, 2026 10:05
@l4zy0n3 l4zy0n3 changed the title Document using Longhorn with self-replicating components Document avoiding storage-level double replication Aug 26, 2026

Some `HA` sizing-profile components run with both application-level replication (2-3 copies of their own data across pods) and storage-level replication (your StorageClass keeping another 2-3 copies of each volume). Combined, this multiplies storage usage far beyond what's needed for redundancy -- for example, 3 application copies on a StorageClass that also keeps 3 copies results in 9 copies of the same data.

For components where the application already replicates, you can use a StorageClass that keeps only one copy per volume, relying entirely on the application's own replication for redundancy instead. This applies to any storage backend that replicates by default -- consult your backend's own documentation for the equivalent setting. https://longhorn.io/[Longhorn] is documented in detail below since it's the backend we've tested this against.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
For components where the application already replicates, you can use a StorageClass that keeps only one copy per volume, relying entirely on the application's own replication for redundancy instead. This applies to any storage backend that replicates by default -- consult your backend's own documentation for the equivalent setting. https://longhorn.io/[Longhorn] is documented in detail below since it's the backend we've tested this against.
For components where the application already replicates, you can use a StorageClass that keeps only one copy per volume, relying entirely on the application's own replication for redundancy instead. This applies to any storage backend that replicates by default -- consult your backend's own documentation for the equivalent setting. link:https://longhorn.io/[Longhorn] is documented in detail below since it's the backend we've tested this against.


=== Longhorn

Longhorn's own https://longhorn.io/docs/latest/best-practices/#io-performance[best practices] recommend `strict-local` data locality with a single replica for exactly this case ("applications that support data replication, e.g. a distributed database"), or reducing `numberOfReplicas` to `2` as a smaller middle-ground step.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
Longhorn's own https://longhorn.io/docs/latest/best-practices/#io-performance[best practices] recommend `strict-local` data locality with a single replica for exactly this case ("applications that support data replication, e.g. a distributed database"), or reducing `numberOfReplicas` to `2` as a smaller middle-ground step.
Longhorn's own link:https://longhorn.io/docs/latest/best-practices/#io-performance[best practices] recommend `strict-local` data locality with a single replica for exactly this case ("applications that support data replication, e.g. a distributed database"), or reducing `numberOfReplicas` to `2` as a smaller middle-ground step.

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

Successfully merging this pull request may close these issues.

3 participants