On 2017-07-26 19:38 (-0700), "Peng Xiao" <2535...@qq.com> wrote: 
> Kurt/All,
> 
> 
> why the  # of racks should be equal to RF?
> 
> For example,we have 2 DCs each 6 machines with RF=3,each machine virtualized 
> to 8 vms ,
> can we set 6 racs with RF3? I mean one machine one RAC to avoid hardware 
> errors or only set 3 racs,1 rac with 2 machines,which is better?
> 
> 

The guarantee you get from racks is that IF you have more racks than replicas, 
you won't have 2 replicas on the same rack. There's no requirement that # of 
racks >= # of replicas, you just leave yourself exposed to losing quorum if you 
have an outage while # racks < # replicas. 

Yes, with a rack == a hypervisor, the snitch would avoid placing 2 replicas on 
the same physical machine, and would protect you against hardware errors. 
There's nothing to gain from having 3 racks instead of 6 in that case (in fact 
6 is probably better, as you're less likely to have to skip a duplicate rack in 
getNaturalEndpoints()).

All of this said:

BE REALLY CAREFUL WHEN USING RACKS. 

If you start with # of racks < RF, and you try to add another rack, you will 
probably be very unhappy (when you add that first node in the new rack, it'll 
take 1/RF of the ring instantly, which usually crashes everything). For that 
reason, a lot of people advise not to use racks unless you have > RF racks, or 
you REALLY know what you're doing.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@cassandra.apache.org
For additional commands, e-mail: user-h...@cassandra.apache.org

Reply via email to