educative.io

Educative

Tweet id creation strategy is flawed

Hi @Design_Gurus,

While generating tweet id u use only epoc+increment sequence, and then u find shard and store it.But that does not guarantee that it is time sorted since increment sequence can be coming from odd or even, which are not in sync.

That is kinda assuming the order of tweets within the same second does not matter much.