Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How many bytes of memory is a tweet?

Tags:

string

memory

140 characters. How much memory would it take up ?

I'm trying to calculate how many tweets my EC2 Large instance Mongo DB can hold.

like image 524
TIMEX Avatar asked May 14 '11 04:05

TIMEX


People also ask

How many bytes is a Tweet?

The average size of a tweet is 300 bytes.

How many MB is a Tweet?

Maximum file size is 512MB for TweetVideo, but you are able to upload a video longer than 2 minutes and 20 seconds, and trim it before including the video in a Tweet. Complete your message and click Tweet to share your Tweet and video.

How much data is a single Tweet?

This would work out to around 84TB of text during that period if every single tweet were the maximum 140 characters or around 44TB using a 74-character average tweet length.

What is the average size of a Tweet?

The long and the short of it It turns out that the average tweet is 28 characters long, with a spike at the 140 character mark.


1 Answers

Twitter uses UTF-8 encoded messages.

UTF-8 code points can be up to six four octets long, making the maximum message size 140 x 4 = 560 8-bit bytes.

This is, of course, just for the raw messages, excluding storage overhead, indexing and other storage-related padding.

e: Twitter successfully let me post the message:

™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™

Yes, that's 140 trademark symbols, which are three octets each in UTF-8

like image 87
Charles Avatar answered Oct 24 '22 08:10

Charles