We have a global project. We will have some servers all continents. We separate the datas because it is not necessary that they be in one place together. BUT! We need unique IDs (MySQL, InnoDB). I have two ideas.
- We use the
auto_increment_offseteach server. The problem: we don't know how many servers will be!
- We create a custom random ID generator with
VARCHAR(16-32)primary keys. The problem: How can we guarantee the unique values (maybe unique server prefix?) and it isn't slower?
Have anybody other idea? I made some fast benchmark, and I don't find differents the integer or varchar primary key.