Hacker News new | ask | show | jobs
by fortran77 2529 days ago
Thanks! I also realize that if you have distributed database nodes, it's becomes a very hard problem to have a monotonically incrementing id. But still, mysql/mariadb does it, and so does Microsoft SQL Server (via IDENTITY)
1 comments

MySQL sort of cheats (but it's a good cheat!) by auto_increment_increment/offset which is means as long as you have a fixed amount of nodes , you are good, server #1 uses 1,4,7 etc #2 uses 2,5,8 etc and #3 uses 3,6,9 .. adding a node requires reconfiguring (but not restarting) all nodes.