<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">...<br>
<br>
</div>It can be a great advantage when scaling to be able to partition the<br>
transactions across different parts of the database. If we want this to<br>
be able to scale, I think we *have* to make it work without requiring<br>
transactions across environments. There is no way that we can scale<br>
as far as we'd like to by using a single mongo replica set for all environments.<br></blockquote><div><br></div><div>You generally shard across replica sets, and if you shard by environ uuid (say by putting it as a prefix on all the _ids) then each of those is a different write master.</div>
<div><br></div><div>It seems conceptually easier than trying to route to a different collection set. Certainly sharding will be easier to rebalance (I think) than moving the collections around.</div><div><br></div><div>John</div>
<div>=:-> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
This talk is about mysql, not mongo, but I believe some of the lessons<br>
are relevant to us. <a href="https://www.youtube.com/watch?v=qATTTSg6zXk" target="_blank">https://www.youtube.com/watch?v=qATTTSg6zXk</a><br>
<br>
By my calculations, with a maximum-sized namespace file, a single<br>
mongo should be able to support over 90000 environments<br>
using a separate collection-set for each environment.<br>
<br>
>From my recollection of juju performance, we will be lucky to scale<br>
a single mongo up to 1000 environments, let alone 90000, so I suspect we'd never<br>
get remotely that far. Perhaps there are other disadvantages<br>
from having many collections though.<br>
<br>
It would be nice if we could make this crucial architectural decision in<br>
the light of some actual measurements. We may all have some kind<br>
of gut feeling for how this might perform, but without actually measuring,<br>
we just don't know.<br>
<br>
As usual, my first reaction is KISS.<br>
<br>
  cheers,<br>
    rog.<br>
</blockquote></div><br></div></div>