Document using Longhorn with self-replicating components - #387
Conversation
✅ Deploy Preview for suse-obs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
c6823e8 to
b007ebf
Compare
b007ebf to
d9eeb3a
Compare
d9eeb3a to
cfbcf45
Compare
Kafka, ZooKeeper, ClickHouse, and HDFS DataNodes already replicate their data at the application layer. Longhorn's default StorageClass also replicates each volume, multiplying storage usage on top of that. Document a single-replica, data-local Longhorn StorageClass for these components, the per-component override, and the caveats: strict-local is incompatible with RWX, and node drains hang by default with only one replica unless the Node Drain Policy is set to always-allow.
cfbcf45 to
1912e1e
Compare
|
|
||
| == 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. |
There was a problem hiding this comment.
For elasticsearch we need a helm chart update I believe, right?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
We should include a little bit more I think:
| `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. |
There was a problem hiding this comment.
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/
What
Documents how to configure Longhorn for components that already replicate their own data at the application layer (Kafka, ZooKeeper, ClickHouse, HDFS DataNodes), to avoid doubling up on storage-level replication.
Why
These components already keep multiple copies of their data across nodes. Longhorn's default StorageClass also replicates each volume (3 copies by default), multiplying storage usage unnecessarily on top of the application's own copies.
Changes
Using Longhorn with self-replicating componentsinstorage.adocnumberOfReplicas: 1,dataLocality: strict-local)storageClassoverride example for the affected componentsstrict-localis incompatible with RWX, and node drains hang indefinitely by default with a single replica unless Node Drain Policy is set toalways-allow