On Tue, Nov 15, 2011 at 9:03 PM, Yan Chunlu <springrider@gmail.com> wrote:
> thanks a lot for the tip!
> sorry for used the wrong word, it is just multi-master but not sharding, I
> would like to setup two master server across two datacenter. one's id
> increased by 1, and the other by 2.
> so I could have a queue sync the record in the background by myself. kind
> of a dumb way but it seems they only choice for me, the delay within
> several minutes is acceptable.
you might want to look at either using a larger skip, like 10 or 20,
so you can add more servers at a later date if you need to. The other
way is to start each sequence at some huge offset like 2Billion and be
sure to use a bigint not a regular int.