> 1.27 million requests per second > 3TB/minute of traffic "rails doesn't scale"
That's not on a per-host basis. Shopify's design is, quite fortunately, one that partitions really well, as each store is completely independent of each other. Each store can be assigned to one pod, each pod can have as many hosts as it takes to optimize the use of a database instance, and then you can add more pods as the need arises. Edit: to be clear, that's not to say Rails can't scale. It can. It's just that it…
Ruby 3.3's YJIT Runs Shopify's Production Code 15% Faster
91–100 of 158 posts
Re: Ruby 3.3's YJIT Runs Shopify's Production Code 15% Faster
#92PHP went through some crazy performance improvements from PHP 5.6 to 7.0, in some cases running twice as fast. It's good to see Ruby doing the same. There is something neat about the same code running faster, solely by being on an upgraded platform.
https://www.reddit.com/r/PHP/comments/16hu7dq/php_is_getting...
Re: Ruby 3.3's YJIT Runs Shopify's Production Code 15% Faster
#93Earlier quoted context omitted.
Yes, not ideal. But we can’t know what would have happened if they had chosen a different language in 2007. Did they have the option of an efficient, well supported language that continues to be used in 2023? Maybe Java, although Java languished for years before development picked up again. C# is also a candidate. But one thing we can’t measure - how many candidates chose to join Shopify and GitHub because they were…
The problem is at the time if you want things done fast, Rails was the right choice. Almost no startup would touch Spring as app server at the time. Django had not reached 1.0 yet, and it's not faster anyway. So for a startup, Rails was the only realistic choices.
Re: Ruby 3.3's YJIT Runs Shopify's Production Code 15% Faster
#94Earlier quoted context omitted.
No, they both matter. The database can handle X shops per partition, and the rails host can handle Y shops per partition. If rails were half as fast, you'd need twice as many rails hosts (but no more databases).
> but no more databases Sort of. Twice as many rails hosts means more DB connections which generally means more load/memory on the DB or more load/memory on the external connection pooler. It's only a bit of incremental load, but it's easy to overlook how many other systems need to run to make Rails scale.
Re: Ruby 3.3's YJIT Runs Shopify's Production Code 15% Faster
#95Earlier quoted context omitted.
C# in 2006 was a joke, probably worse than Rails in performance. This was the webforms era and old EF - meant for enterprise customers with a couple of hundred active users max... ASP.NET being a competitive/performant framework is a very recent development (since core basically which became usable past 2.0) Haskell, OCaml and D are niche languages, probably aren't mature enough now to use for a production system tha…
A joke is this comment. All of them were faster and used less resources than a very slow interpreted language, by having JIT and AOT compilers, state of the art GC and great IDE offerings, even the niche ones had better tooling (Leksah and Merlin, versus nothing).
Haskell, OCaml, D with great IDE support in 2006 ? Do they have that even today ?
I mean you're suggesting people use C++ for writing web apps (and c++98/03 no less !) - that's got to be facetious.
The real contender back then was PHP and Java, RoR really addressed a lot of issues from both. They both adopted the improvements brought by it since, but it took years.
Re: Ruby 3.3's YJIT Runs Shopify's Production Code 15% Faster
#96Earlier quoted context omitted.
Nobody cares about performance if you build a business application with a couple of users, a common use-case in 2005. The reason a lot of Java people jumped on the Rails bandwagon, was that an application that would take a month to build in Java with Spring/Hibernate, would take a day in Rails. See also: https://www.oreilly.com/library/view/beyond-java/0596100949/
Some Java people did, there is a reason why Ruby is hardly used outside Rails, while Java rules most of the backend workloads, a mobile OS, and plenty of embedded workloads.
Re: Ruby 3.3's YJIT Runs Shopify's Production Code 15% Faster
#97Earlier quoted context omitted.
It is not 2006 anymore. Rails was a trailblazer. The productivity difference is not as large as it was compared to alternatives.
There are not comparably productive alternatives for rust right now :(
Re: Ruby 3.3's YJIT Runs Shopify's Production Code 15% Faster
#98Earlier quoted context omitted.
> but no more databases Sort of. Twice as many rails hosts means more DB connections which generally means more load/memory on the DB or more load/memory on the external connection pooler. It's only a bit of incremental load, but it's easy to overlook how many other systems need to run to make Rails scale.
No he’s his examples he’s talking 50 stores over 10 machines vs 50 stores over 5 machines. Both would require the same DB count, but the second would save on server costs for stores.
Having 1000 connections doing 1 request per second isn't the same as having 1 connection doing 1000 requests per second.
But, and I could be wrong, the larger factor is the number of requests per second.
Re: Ruby 3.3's YJIT Runs Shopify's Production Code 15% Faster
#99Earlier quoted context omitted.
Am I really going to have to get out the premature optimization quote? Most businesses fail. Those that don't fail, usually don't have interesting scaling issues. (You can go a really long way on a boring monolith stack.) So in most cases, whatever gets things out into the world and able to see if the business can be validated makes sense, and then you optimize later. A nonscalable stack that you can iterate on 50% f…
This hints at a false dichotomy. One that especially Ruby and Rails keep afloat. Productivity and Scalability(in performance sense) aren't opposites. Take Bash. Performs bad and is a guarantee for terrible productivity in a large category of software. But perfect for a niche. Take Java. Performs better than many, and allows for good productivity (if you avoid the enterprise architectures, but that goes for any langua…
Primarily it's not the language that makes people more or less productive, though it does have some influence. It's mostly the frameworks in those languages. And traditionally the most modern / full-featured web frameworks haven't been in systems languages. The major counterexample at the moment (while still obviously not a systems language) is that modern JS VMs are actually really fast, so while I don't love JS, it does hit that sweet spot at the moment of performance and mature frameworks.
Also, I've never worked in Rust, but am mostly a systems programmer, and while I understand that Rust is supposed to be easier than C or C++, I'm skeptical that it's as easy to work with as higher level languages, or that you could throw most web developers into Rust without some serious additional learning.
Re: Ruby 3.3's YJIT Runs Shopify's Production Code 15% Faster
#100Earlier quoted context omitted.
The problem is at the time if you want things done fast, Rails was the right choice. Almost no startup would touch Spring as app server at the time. Django had not reached 1.0 yet, and it's not faster anyway. So for a startup, Rails was the only realistic choices.
What I find ironic was that in 2006, Rails was the shiny new kid on the block. These co's picked the "new" way of doing web dev compared to the stodgy Java/C# types. And yet, by recommending Rails for a new startup in 2023, they're actually more like the stodgy Java/C# old school paradigm camp, that the Rails startups avoided! A startup that would've used Rails in 2006 is more like a startup that is using things like…
What comes next might not even be better, but that won't matter, because what came before won't be cool anymore.
You die a hero or live long enough to become the villain.