[Openstack] swift and two data-centres - hierarchical zones?

John Leach john at brightbox.co.uk
Sat Mar 10 13:58:37 UTC 2012


Hi,

I'm looking at deploying swift across two data-centres - I'd like to
write 3 replicas: two in one data-centre and the third in the other
another (doesn't matter which way around). I'd like to be able to
tolerate the failure of (or loss of connectivity to) either data centre.

If I create one zone per data-centre, I can't write 3 replicas (as each
replica needs to go in a different zone).

I can create two zones per data-centre, which appears at first to do the
job, but I can't add any more zones to either data centre (without
increasing the replica count to ensure at least one copy is always in
the other data-centre). So if I lose access to one data-centre, and lose
one zone in the remaining data-centre, I can no longer make writes to
the required minimum 2 zones.

I could use container replication here of course, but then I'll be
writing 6 replicas in all.

I think what I need here is hierarchical zones - I'd define one parent
zone per data-centre, and then multiple child zones within each
(representing racks or whatever).

Swift would be configured to write 3 replicas in 3 child zones, aiming
for at least 1 one replica per parent zone (handing off if the parent
zone is unavailable).

Apache Cassandra can do this kind of thing with it's RackAwareStrategy
replication strategy. You define which servers are in which racks and
which racks are in which data-centres.

I saw an oscon 2011 swift talk slide that mentioned "layered zones" as
future dev work - mentioning "cabinets, not zones".  Extrapolating from
these 5 words, this is exactly what I need, when will it be ready? ;)

Any thoughts on this?  Can the existing Ring implementation be extended
to do this kind of thing? Is the code modular enough to be able to make
the Ring implementation pluggable?

Thanks!

John.
--
Brightbox UK Cloud - http://brightbox.com




More information about the Openstack mailing list