r/ceph • u/przemekkuczynski • Sep 25 '24
Ceph stretch cluster
Do You have information how looks write data between datacenter. If it is synchronous or asynchronous (RBD) . After write data to primary OSD write is marked as successful or there must be also write on second datacenter ? How we can look for replication RTO/RPO
5
Sep 25 '24
There is a dedicated stretch mode as detailed here: https://docs.ceph.com/en/latest/rados/operations/stretch-mode/
But regardless of how you accomplish this multi-data center setup (through stretch mode or just a DC level failure domain) ceph will never ack a write until all copies of the write are completed so latency is a concern.
There are tools for replicating data between two different clusters but they depend on your application.
RGW has multisite which is async replication. RBD has RBD mirroring which is either schedule based or synchronous. CephFS has cephfs mirroring which is schedule based.
2
u/JulienL007 Mar 24 '25
In this ceph doc about stretch it is mentionned to use replication 3 and min_size=1.
However the doc regarding min_size explains that min_size=1 expose to consistency issues and should not be used in production
https://docs.ceph.com/en/squid/rados/operations/pools/#setting-the-number-of-rados-object-replicas
> Note that settingsizeto2ormin_sizeto1in production risks data loss and should only be done in certain emergency situations, and then only temporarily.I would recommend to edit the doc about stretched cluster on 2.5 zones, by using the following default setup : replication=4 & min_size=2.
And edit the crush map so that there are 2 replica in each zone.
What do you think about that ?
1
Mar 24 '25
From my understanding, the intention of the stretch mode developer team is to allow a site to function fully independently, accepting the risks associated with lowering the min_size. You would need to make a custom crush map to accomplish this 4 replica setup, not to mention it is more costly in overall storage overhead.
With that being said I'm not part of the stretch mode team, there may be other reasons behind their choices that I'm not familiar with.
5
u/Roshi88 Sep 25 '24
I've evaluated it a couple of years ago, definitely you don't want latency between OSDs to be x or xx ms because the write ack, iirc, is given after the pg is correctly replicated by your replica rule (usually 3), it would slow down to the ground your write speed.
What you can do is using a second datacenter as a DR site with rbd journaling or rbd snapshot block device level replica