16 ms·
> 1.27 million requests per second > 3TB/minute of traffic "rails doesn't scale"
by sho 3y ago
> 1.27 million requests per second
> 3TB/minute of traffic
"rails doesn't scale"
- ChadMoran 3y agoRails scales fine. People use that as an escape hatch when they don't know how to write performant code.
- Gigachad 3y agoYou don't even have to write performant code. You can just start as many instances of the rails app as you want. The bottleneck is usually the database.
- bingemaker 3y agoWhat is the hardware spec here?
- charcircuit 3y agoYou need the number of servers and server specs to answer that question. Even if a piece of software could only handle 1 request per second you could handle 1.27M requests if you just run 1.27M servers.
- CaveTech 3y agoThese two points are entirely unrelated. Scaleability in that meme is not considering horizontal scalability, which approaches infinity for literally any language/framework. It only makes sense in the context of vertical scalability, and gross req/sec offers no insight into whether or not that's true.
- Gigachad 3y agoI can't see how vertical scalability even matters for rails You can just start more instances. It's not like two active web requests need to interact with each other.
- deleted 3y ago[deleted]
- mabbo 3y agoThat'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 doesn't need to- you can scale anything with enough partitioning.
- choilive 3y agoSure.. but isn't that a database problem and not a rails problem?
- mabbo 3y agoNo, 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).
- phamilton 3y ago> 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.
- brianwawok 3y agoNo 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.
- mabbo 3y agoI think the above means (if I do get the point) that databases scale in terms of both requests per second and number of active connections. 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.
- Scarbutt 3y agoAre there companies in the last 7 years that have started with rails and have become big like spotify?
- rognjen 3y ago(I assume you mean Shopify not Spotify) No exactly a fair question because Shopify is much older and is valued at 70B. For a company to have done it in half the time would have been impressive regardless of tech whereas on average it takes 7 years to become a unicorn. I do know that Aircall is relatively young, on a good trajectory and runs Rails.
- rahoulb 3y agoDepends on your definition of big. Partly, you need mobile now, so any Rails stuff is likely to be back-end and hidden. Plus big investors like to go for the exciting stuff. But if you're looking at companies aren't household names (taking smaller amounts of investment), there are lots out there. Syft (recruitment) were founded in 2016 and have revenues of over $100m per year - although that's partly due to acquisition by a larger competitor, so when I just looked, separating their valuation from the group wasn't immediately obvious. I've freelanced and contracted across a few niche industries (construction, print, airport signage management!) where I was building something against competitor software that I discovered was at least partially built with Rails. Those big players in each niche would have revenue in the tens of millions and from what I could see, very small technical teams. But anyone outside those industries would never have heard of these companies.
- rapsey 3y agoOk now what is the cost of all the instances. And how many instances would be required if Go/Rust would have been used? Also what is the cost in man hours spent on optimizations and profiling.
- berkle4455 3y ago> And how many instances would be required if Go/Rust would have been used? Zero. Because Shopify would have waited until Rust came out in 2015, instead of launching in 2006, and they would never have gotten off the ground and been another failed techbro startup that instead of getting shit done, bikeshedded over languages. PHP and Ruby apps have generated far more revenues than all the Rust and Golang code combined.
- pjmlp 3y agoOr they could have used something available in 2006, like C++, Java, .NET/C#, OCaml, Haskell, D.
- moonchrome 3y agoC# 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 that needs to scale (in terms of org growth and building complex systems). Java web frameworks were also terrible in 2006 (this is the Java era that gave Java it's reputation) and the only thing worse for productivity I can think of is C++ hahaha ...
- pjmlp 3y agoA 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).
- hnisforfascists 3y ago[dead]
- ChadMoran 3y agoPeople in this thread don't know the difference between performance and scale.