Superintelligence CouncilСовет гения · sim.im

DHH · 2025-07-12 · source ↗ · whole document (12)

Scaling

`1:18:55`

They end up then I think writing it in some other language, which by the way I think is the best advertisement ever for Ruby on Rails, because nothing fucking happened for 10 years after they switched over, right? Essentially zero innovation. Some of that was because they were doing a long conversion, and all of the early success in part came because they had the agility quickly change and adopt and so forth. That's what startups needs. That's what Shopify needed. That's what Twitter needed. That's what everyone needs. And that's the number one priority for Ruby on Rails. To make sure that we don't lose that. Because what happens so often when development tools and program language driven by huge companies is that they mirror their org chart. React and everything else needed to use that is in some ways a reflection of how Meta builds Facebook. 'Cause of course it is. Because of course it's an destruction of that. I'm not saying React isn't a great tool and that can't be used by smaller teams. Of course it can. But it's born in a very different context

`1:19:58`

than something like Ruby on Rails. — Let me say this a small aside because I think we might return to Shopify and celebrate it often. Just a sort of personal note. This particular podcast has way more sponsors and sponsors that want to be sponsors than I could possibly ever have. And it's really, really important for me to not give a shit, and to be able to celebrate people. Like I celebrate people. I celebrate companies. And I don't care that they're sponsoring. I really don't care. I just wanna make that very explicit 'cause we're gonna continue saying positive things about Shopify. I don't care. Stop sponsoring. It doesn't really matter to me. But yeah, I just wanna make that explicit. So, but to linger on the scaling thing with the Twitter and the Shopify, can you just explain to me what Shopify is doing with the YJIT? What did they have to try to do to scale this thing? Because that's kind of an incredible story, right?

`1:20:59`

— Yeah, so one of the great contributions that Shopify has made to the entire Ruby ecosystem, not just Rails but in particular Rails is YJIT. So YJIT is their compiler for Ruby. That just makes everything a lot more efficient and at Shopify scale eking out even a five, 10% improvement in Ruby's overhead and execution time is a huge deal. Now, Shopify didn't need YJIT. Shopify was already running on the initial version of Ruby that was, I think 10 times slower than what we have today. If you look back upon the Ruby 186, that Tobi probably started on just as I started on, and that was enough to propel Shopify to the scale that it has today. A lot of the scaling conversation in is lost in a failure to distinguish two things. Scale is kind of one package we talk about when there are really multiple packages inside of it.

`1:21:59`

One is runtime performance, latency. How fast can you execute a single request? Can it happen fast enough that the user will not notice? If your Rails request takes a second and a half to execute, the user's gonna notice. Your app is gonna feel slow and sluggish. You have to get that response time down below, let's say at least 300 milliseconds. I like to target a hundred milliseconds as my latency. That's kind of performance. How much performance of that kind of latency can you squeeze out of a single CPU core, that tells you something about what the price of a single request will be. But then whether you can deal with 1 million requests a second like Shopify is doing right now. If you have one box that can do a thousand requests a second, you just need X boxes to get up to a million. And what you'll actually find is that when it comes to programming languages, they're all the same in this way. They all scale largely beautifully horizontally. You just add more boxes.

`1:23:01`

The hard parts of scaling a Shopify is typically the program language. It's the database. And that's actually one of the challenges that Shopify has now is how do you deal with MySQL at the scale that they're operating at? When do you need to move to other databases to get worldwide performance? All of these things. The questions about scaling Ruby are economic questions. If we are spending so and so much on application servers, if we can get just 5% more performance out of Ruby, well we could save 5% of those servers and that could filter down into the budget. Now that analysis concludes into basically one thing. Ruby is a luxury language. It's a luxury, the highest luxury in my opinion. It is the Coco Chanel of programming languages. Something that not everyone can afford. And I mean this in the best possible way. There are some applications on the internet