TweetID data size

"If we are getting 400M new tweets each day, then how many tweet objects we can expect in five years?

400M * 365 days * 5 years = 730 billion

This means we would need a five bytes number to identify TweetIDs uniquely."

Help me understand, how did we arrive at 5 bytes from 730 Billion tweets? Why not 8 or 10 bytes?


Hi @Dieon

A byte contains 8 bits.

4 bytes contain 32 bits. 32 bits can count around 4 Billion (2^32 ~ 4B).
So, we cannot use it as we needed 730B.

5 bytes contains 40 bits, which can store around 1099B. It is more than what we required. So there is no need to use any more bytes than 5 to store our 730B tweets.

1 Like