Thanks for raising this Sandy: +1 on keeping separate DBs until a problem arises.<div><br></div><div>I don't see a performance problem with recursively querying child zones.  I guess this will partially depend on our zone topology: if the intent is to have child zones that are geographically distributed where the latency becomes an issue (and it's not clear to me that even this will be a problem), then we could use a 'caching' approach rather than the 'total consistency' approach that a database implies.<div>
<br></div><div>It does seem like there's a separate issue, which is finding the appropriate zone for a given instance.  Again, we could easily use caching here, and simply retry on cache miss.</div><div><br></div><div>
What sort of complexity of zones hierarchies are we contemplating?  Even at our full target scales, I don't believe we're talking about more than a dozen zones (?), and I believe that even the naive implementation which simply recursively queries child zones with no caching will be more than good enough.<br>
<br></div><div>Justin<br><br>
<br><br><div class="gmail_quote">On Wed, Mar 16, 2011 at 7:53 AM, Sandy Walsh <span dir="ltr"><<a href="mailto:sandy.walsh@rackspace.com">sandy.walsh@rackspace.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">





<div>
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">Hi y'all, getting any sleep before Feature Freeze?
<div><br>
</div>
<div>As you know, one of the main design tenants of OpenStack is Share Nothing (where possible). <a href="http://wiki.openstack.org/BasicDesignTenets" target="_blank">http://wiki.openstack.org/BasicDesignTenets</a></div>

<div><br>
</div>
<div>That's the mantra we've been chanting with Zones. But it does cause a problem with a particular Use Case:</div>
<div><br>
</div>
<div><i>"Show me all Customer X Instances, across all Zones."</i></div>
<div><br>
</div>
<div>This is an expensive request. We have to poll all zones and ask them to return a list of matching instances.</div>
<div><br>
</div>
<div>There has been some water cooler chat about some things we could do to make this more efficient in the near term. One proposal has been to assume a single database, replicated across zones. I'll call it SDB for short. With SDB we can have a join table
 that links Zone to Instance ... keeping a record of all instances across zones. Maybe it's a completely separate set of tables? Maybe it's a separate replicated db? The intention is to let us talk to the appropriate zone directly. </div>

<div><br>
</div>
<div>Sure, there are a ton more optimizations we could make if we go further with SDB. We could store all the Zone capabilities in the db to make Zone selection faster. We could store all the customers in the db to make multi-tenant easier. But that's not what
 we're talking about here. We're talking about the<i> bare minimum </i>required to make the get_instances query fast. </div>
<div><br>
</div>
<div>Conversely, there are issues with a single DB. The largest being the implication it has on Bursting (Hybrid Private/Public clouds) ... a pretty funky feature imho. </div>
<div><br>
</div>
<div>Personally, I think the same query gains can be obtained by creating a separate db using off-the-shelf ETL tools to create cache/read-only db's. <a href="http://en.wikipedia.org/wiki/Extract,_transform,_load" target="_blank">http://en.wikipedia.org/wiki/Extract,_transform,_load</a></div>

<div><br>
</div>
<div>I was considering SDB for Zones (phase 4), but for now, I'm going to stick with the original plan of separate databases (1 per zone) and see what the performance implications are. </div>
<div><br>
</div>
<div>What are your thoughts on this issue?</div>
<div><br>
</div>
<div>... let the games begin!</div>
<div><br>
</div>
<div>-S</div>
<div><br>
</div>
<div><br>
</div>
</div>

<pre>Confidentiality Notice: This e-mail message (including any attached or
embedded documents) is intended for the exclusive and confidential use of the
individual or entity to which this message is addressed, and unless otherwise
expressly indicated, is confidential and privileged information of Rackspace.
Any dissemination, distribution or copying of the enclosed material is prohibited.
If you receive this transmission in error, please notify us immediately by e-mail
at <a href="mailto:abuse@rackspace.com" target="_blank">abuse@rackspace.com</a>, and delete the original message.
Your cooperation is appreciated.
</pre></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></div>