3 ms·
How Flickr does this: http://code.flickr.com/blog/2010/02/08/ticket-servers-distributed-unique-primary-keys-on-the-cheap/ http://code.flickr.com/blog/2010/02/08
by sanxiyn 15y ago
How Flickr does this: http://code.flickr.com/blog/2010/02/08/ticket-servers-distributed-unique-primary-keys-on-the-cheap/ http://code.flickr.com/blog/2010/02/08/ticket-servers-distri...
Simple, really.
- codebeaker 15y agoAnd overkill for almost all intermediate sized installations, but a great use of their technology to meet their requirements, thanks for the link. Of course Twitter have snowflake: https://github.com/twitter/snowflake https://github.com/twitter/snowflake and many other tools such as UUID[4r] - see an old discussion on HN: http://news.ycombinator.com/item?id=1396667 http://news.ycombinator.com/item?id=1396667 Of course I wanted sequential, small IDs, within a small margin of acceptable loss (if a save fails that ID is never used), that were't taking up a massive amount of space.