Skip to content

Comment on Twitter's UID associated to each tweet will very soon exceed 2,147,483,647parent

Comments

For a first guess, if there were 5 writing dbs, each could write every 5th id, starting at a different index (0,1,2,3,4).

You'd end up with globally unique ids, and as long as your writes were (approx.) evenly distributed, all 5 sequences would be (approx.) close to each other.

Who knows, they might have 100 writable dbs, with only 70% up at any point in time, meaning only 70% of all integers are actually used.. anyway, I don't know, I can just imagine them doing something like this if they wanted certain things from the system.

No. Because their API exposes an explicit ordering of the IDs - there is a sinceID: parameter.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.