by danso · 8y ago · 0 comments
At the same time, her defenders say, Harvey has been forced to clean up a mess that Twitter should have fixed years ago. Twitter’s backend was initially built on Ruby on Rails, a rudimentary web-application framework that made it nearly impossible to find a technical solution to the harassment problem. If Twitter’s co-founders had known what it would become, a third former executive told me, “you never would have built it on a Fisher-Price infrastructure.” Instead of building a product that could scale alongside the platform, former employees say, Twitter papered over its problems by hiring more moderators. “Because this is just an ass-backward tech company, let’s throw non-scalable, low-tech solutions on top of this low-tech, non-scalable problem.”
Setting aside the whole "Ruby/Rails is slow" discussion, I would've loved to see more elaboration by these sources about how a web framework makes moderation and policing "nearly impossible". Compared to what? The PHP scripts that became Facebook?
The problem wasn't ruby. The problem was the way that Twitter used Ruby. We had one big mono repo with every single function and every form of business logic baked into a single place. That logic relied on monkey patching and all sorts of crazy horrible glue to keep it working together. Every time we had to scale up we would glue infra in place to keep things working while we came up with a real solution (which never really materialized).
In my time there we had memcache instances which held timelines. Populating them took hours/days and while they were unpopulated the site was offline. Rebooting/restarting the caches was simply not an option. We had a data sharding strategy that was temporal. We would spin up a new database cluster every few weeks to handle all of the incoming tweets and failing to spin up a new cluster in time meant we would have a global site outage. Don't even get me started on the "load bearing mac mini".
In reality the only problem rails really contributed on its own was that it could only process a single request per process at a time. Each machine would spin up 16 or 32 processes to handle requests in parallel but each process needed its own connection to the database, to memcache, etc. At one point we had something like 100k processes all trying to talk to a single mysql master. Much of this could have been mitigated by better design of course, but rails encourages models that don't scale up to crazy dimensions.
In reality moderation was virtually impossible because we were in a 24/7 fight with ourselves about how to keep the system alive for the next couple of days. Constant infighting, managerial changes (I had 9 different managers in 3 years), focus changes (we didn't finish the last major site redesign before starting the next one) and a general unwillingness to pause features long enough to stabilize the system meant we were always on the losing end of a infra battle.
Every so often a person would have a brilliant idea on how to solve our scaling issues. They would then disappear into a corner to invent yet-another-bird-themed-datastore. After a few weeks/months they would appear with a magical new thing that would fix all our problems and would make everybody happy. Every single time it would fail.
Having a team that is not the main team design something means that they likely didn't understand the state of the thing that they were replacing. The thing they were replacing was a bucket of edge cases non of which they knew about. The scale never looked like what they expected because in the meantime the load had changed. This was compounded by the constant desire to hire somebody external that could solve the problem for us. They would come in with ego and a feeling that they had a mandate to replace it all. Eventually they would learn just how fragile and complicated the system was, only to then be considered old guard enough to be replaced by the next wave of experts. =/
But the number one killer was that every single thing was baked into the mono repo so it wasn't like they could have just easily shimmed in something to replace the old thing. All the while that they are building in a change to the data store another dev has added 15 new features that they now have to port over. In the time it took to port those over another 20 had been added.. etc.
Just getting the okay to pause feature development was like pulling teeth and it only bought you a few weeks at best.
Can I get this on a T-shirt?
https://job-openings.monster.com/Full-Stack-Senior-Software-...
https://job-openings.monster.com/Senior-Web-Engineer-BLAW-Ne...
Bloomberg is fairly well known for having top notch technical capabilities (in their general space). What they build tends to work, work well, and have high reliability.
But what if following had only been bi-directional for example? What if the platform never displayed retweet or star count? What if muting and blocking had been built in from the start? What if you could only @mention people who follow you?
It’s very possible that twitter would never have become Twitter if these things had been different, but that’s also my point. So while it may not be a technical root cause in the classic coding sense, I can buy the argument that many of twitter’s early technical and design decisions (as well as their early platform policies and who the first adopters were) led to their present difficulties
Whoever was quoted has precisely Zero current understanding of moderation and the challenges it faces.
And worse - they haven't reflected on what "technical acumen" resulting on anti-harassment tools means.
Effective anti harassment tools can suss out intent, and by nature are also censorship tools.
Effective tools which can identify intent are so far past invasion of privacy, that they may as well be categorized as assaults on specific ideas.
If twitter does come up with this magical tool, then it's a sure bet that other nation states will also have this magic algorithm.
This rule applies to all lesser tools for "anti-harassment".
The solution sadly IS hiring more moderators, and journalists vetting.
Which I suspect is impossible at the scale and message type twitter operates on.
https://www.google.com/amp/s/techcrunch.com/2008/04/23/amate...
Of course, it is a stretch to suggest that in ten years they couldn’t reinvent the architecture.
It took them many years to get beyond the “fail whale”. And it is surprising who they thought of as experts at scaling:
“And this week they hired two scaling experts – John Kalucki and Steve Jenson (“known for his work scaling Blogger and Blogspot”).”
No offense to those guys, but Blogger and Blogspot were also notorious failures at scaling. Bloggers problems were not fixed till a year or two after they were bought by Google.
Steve and John were both good developers that wrote some seriously critical components of the system and were a big part of getting twitter more stable. But reading Techcrunch to figure out what was happening inside of Twitter is asking for serious misinformation. At that time it was very common for people with no idea what they were talking about to write articles about what was going on inside of Twitter, yet do so with authority that they didn't really have. By the time a team of reliability focused people started to get hired Twitter was finally getting smart about not letting employees/outsides control the messaging sent to Techcrunch and the like.
Twitter has completely reinvented the architecture since I left so that is not impossible by any means.
Lets be clear about the rate that Twitter was growing though. In any 9 month window while I worked there they never failed to grow an order of magnitude in request volume. When I started we would have spikes of a few thousand requests per second. We had a major site outage at 451 tweets per second and we simply couldn't keep up. 9 months later we were spiking 50k requests per second, and we never dropped below 451 tps (barring outage). By the time I left both of those numbers simply couldn't be seen in the graphs anymore.
Every time we got technology in place to deal with the scaling issues we were already behind the curve because of how fast things were growing. It felt like being in a car that has amazing 0-60 time, but it just kept accelerating well beyond 60mph.
There are financial systems that handle millions of transactions per second because their designers sat down and designed systems that could scale by magnitudes.
Ultimately it wasn't "build a db that handles x writes" though. That is actually a fairly known and solvable problem. Our issue was that we were migrating from a design model that encouraged rabid development by using existing patterns to a model that would scale up much better but required a lot more planning and design, all while dealing with management that expected the feature development cycle to not slow down at all during or after the transition.
My understanding is that Twitter moved away from Ruby/Rails back in 2010-2012 anyway, making the comparison more confusing.