3 ms·
Can't find the link, but flikr recently had a post somewheres (maybe highscalability.com? I cannot find it for the life of me...) about how they handle unique
by Travis 17y ago
Can't find the link, but flikr recently had a post somewheres (maybe highscalability.com? I cannot find it for the life of me...) about how they handle unique IDs. In essence, they have one "ticket server" that only runs a single database, with a single table, with two fields -- `id`, and `a`. The `a` column doesn't really do anything, but it allows them to issue a mysql REPLACE INTO, which just increments the auto counter, without expanding the table size. Then they have a mechanism to retrieve this next ticket.
Found the link -- does this concept work for you?
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...
- pfarrell 17y agoThanks Travis. That link is great. It doesn't totally address what we're dealing with, but does give me a lot of ideas (which is probably the best that can be expected).