You could try to use the container sync added in 1.4.4.<div><br></div><div>The scheme would be to setup 2 separate clusters in each data center. Obviously requests will be satisfied locally.</div><div>You will also setup your containers identically, and configure them to sync, to make sure data is available in both DC's.</div>
<div><br></div><div>You might want to consider how many replicas you want in each data center, and how you'd recover from failures, rather than just setting up 2 DC x 3-5 replicas for each object.</div><div><br></div>
<div>a.</div><div><br><br><div class="gmail_quote">On Tue, Dec 6, 2011 at 1:49 PM, Caitlin Bestler <span dir="ltr"><<a href="mailto:Caitlin.Bestler@nexenta.com">Caitlin.Bestler@nexenta.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">






<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Lendro Reox asked:<u></u><u></u></span></p><div><div class="h5">
<p class="MsoNormal"><br>
<br>
<span style="color:#1f497d">> </span>We're replicating our datacenter in another location (something like Amazons east and west coast) , thinking about our applications and<span style="color:#1f497d"><u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">>
</span>our use of Swift, is there any way that we can set up weights for our datanodes so if a request enter via for example DATACENTER 1 ,<span style="color:#1f497d"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">>
</span> then we want the main copy of the data being written on a datanode on the SAME datacenter o read from the same datacenter, so<span style="color:#1f497d"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">>
</span>when we want to read it and comes from a proxy node of the same datacenter we dont add delay of the latency between the two datacenters. <br>
<span style="color:#1f497d">> </span>The moto is "if a request to write or read enters via DATACENTER 1 then is served via proxynodes/datanodes located on DATACENTER 1",<span style="color:#1f497d"><br>
> </span>then the replicas gets copied across zones over both datacenters.<u></u><u></u></p>
<div>
<p class="MsoNormal"><span style="color:#1f497d">> </span>Routing the request to especific proxy nodes is easy, but dont know if swift has a way to manage this internally too for the datanodes <u></u><u></u></p>
</div>
</div></div><div>
<p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I don’t see how you would accomplish that with the current Swift infrastructure.<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">An object is hashed to a partition, and the ring determines where replicas of that partition are stored.<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">What you seem to be suggesting is that when an object is created in region X that it should be assigned to partition that is primarily stored in region X,<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">While if the same object had been created in region Y it would be assigned to a partition that is primary stored in region Y.<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">The problem is that “where this object was first created” is not a contributor to the hash algorithm, nor could it be since there is no way for someone<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">trying to get that object to know where it was first created.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">What I think you are looking for is a solution where you have *<b>two</b>* rings, DATACENTER-WEST and DATACENTER-EAST. Both of these rings would have<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">an adequate number of replicas to function independently, but would asynchronously update each other to provide eventual consistency.<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">That would use more disk space, but avoids making all updates wait for the data to be updated at each site.<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
</div>
</div>
</div>

<br>_______________________________________________<br>
Mailing list: <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
Post to     : <a href="mailto:openstack@lists.launchpad.net">openstack@lists.launchpad.net</a><br>
Unsubscribe : <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
More help   : <a href="https://help.launchpad.net/ListHelp" target="_blank">https://help.launchpad.net/ListHelp</a><br>
<br></blockquote></div><br></div>