Ask HN: How technically hard was it for Twitter to move to 280 chars?
This is mostly for folks who work at Twitter or who have heard some behind-the-scenes stories about what it took to do this change.
Given that Twitter has long been only allowing 140 characters, I'm wondering if the 140 character limit assumption was hard-baked into any parts of their architecture that they had to spend time refactoring, or if it was as simple as removing a constraint on the front-most part of their stack? Did it for example require any changes to the storage layer?
Just curious.
41 comments
[ 3.4 ms ] story [ 83.2 ms ] thread#define MAX_TWEET_CHARS 140
to
#define MAX_TWEET_CHARS 280
and a re-compile.
You mean your CSS rules aren't auto-generated from the C preprocessor?
Again, hopefully they had their code base in order and it was simple as changing a static setting, with a single line of code change.
object MAX_TWEET_CHARS { val value = 140 }
to
object MAX_TWEET_CHARS { val value = 280 }
and a re-compile.
Both of those are reasons why companies do staged rollouts of features incase the company makes a mistake.
It's estimated at 500 million tweets a day. So UTF-8 characters take 1 byte. That's an extra 140 bytes needed per tweet (at the minimum, I'm not positive on how it's stored in the back end if they do ngrams or whatever else to a tweet). So that's 70,000,000,000 bytes. That's... 70GB, right? 70gb per day, that's an extra 24.920 TB of space needed per year. Not a large amount. Hell, I have a surveillance server with more storage than that. But then running analytics against that extra data, ALL THE DAMN TIME. Plus, if going 280 does, in theory, increase usage, then that number would be higher. I'm assuming UTF-8. I think I'm wrong. Might be 16, which then increases it to...6 bytes a character? I should really open a google tab, but I'm too lazy. I already grabbed a calculator. My exercise for the day is met :P
An extra 140 character SEEMS small, but on Twitter scale, that's not a light matter. Shit like that can run away on you fast.
edit: Jesus Christ, yes, I didn't include every single bloody thing. This is just a simple 5 minute example how Twitter scale can have a huge impact on "small" decisions. There's outliers in the average statistics. Not everyone will use the full character limit, frequency changes, etc. Nitpickers man...
There could be "big" ramifications, it's a pretty interesting thing to think about :)
Cool to know, thanks.
https://blog.twitter.com/official/en_us/topics/product/2017/...
https://en.wikipedia.org/wiki/Code_refactoring
I worked on a WAP browser a long time ago, which would support SMS in PDU mode as a bearer. WDP packets would just be encapsulated in an SMS. I am too old ... :(
Is that a correct translation?