RFC: mongo "_id" fields in the multi-environment juju server world
roger peppe
roger.peppe at canonical.com
Fri Jul 4 13:32:36 UTC 2014
On 4 July 2014 14:19, John Meinel <john at arbash-meinel.com> wrote:
>> ...
>>
>> It can be a great advantage when scaling to be able to partition the
>> transactions across different parts of the database. If we want this to
>> be able to scale, I think we *have* to make it work without requiring
>> transactions across environments. There is no way that we can scale
>> as far as we'd like to by using a single mongo replica set for all
>> environments.
>
>
> 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.
>
> 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.
It won't be possible to shard the transaction log. I suspect
that will be a serious bottleneck, but again, we don't know
unless we do the experiment.
The thing I'm trying to get across is: until we know one way or
another, I believe it would be better to choose the (much) simpler
option and use the (potential weeks of) dev time for other things.
More information about the Juju-dev
mailing list