2 ms·
If your app is just a postgresql database that needs to be exposed with auth, access control, etc then yes rails is fine. If you’re doing a tremendous amount o
by whalesalad 3y ago
If your app is just a postgresql database that needs to be exposed with auth, access control, etc then yes rails is fine.
If you’re doing a tremendous amount of parallel processing it will fall over without throwing lots of compute and scaling horizontally. Rails doesn’t scale vertically. You need to give it compute, and every other resource it uses will also need more compute. Average joes are fine with a 2 core VPS. Lots of businesses are not.
I need you to send 5-10 million API calls per day to 20 different API’s … are you using Rails? Every API is rate limited differently, with different batch sizes (each having unique parameters) and it needs to literally be done ASAFP to make certain deadlines. If you want to throw money at the problem, sure. If you want to do the same thing with 1/10th of the resources you’ll use a better runtime like Erlang/Elixir or Clojure/Golang something with CSP.
HN is so quick to dismiss things like kubernetes and wax poetic about simpleton life but there are very legitimate reasons to choose alternative tools for your problem space.
- davidw 3y agoElixir's a lot of fun, but it's not the most performant thing either; it just does concurrency pretty well. It seems most really big companies make the boring but safe choice to go with the JVM.
- whalesalad 3y agoDepends on what you’re doing. Elixir isn’t winning the war on raw compute but if you need to do literally 2 million things at once it can’t be beat. It’s ostensibly a drop in replacement for rails (Phoenix) but will do everything rails does better including background tasks. JVM is indeed a powerhouse and that’s where I’d go Clojure without hesitation. Scala might be an easier sell but I’m a lisp fan and have used Clojure in prod (was briefly CTO at FarmLogs a YC company where most of our core infra was Clojure) and it’s really an amazing language but it requires very senior engineers to do correctly.
- jrumbut 3y agoThe key to scaling Rails applications is effective use of caching (at multiple levels). For an online store (compared to, say, a live action game) so much of the content that you serve will be cached that regardless of your apps runtime a lot of the user experience will be defined by how effective your caching strategy is. I think that Rails still offers enough compelling advantages for developer productivity to offset the (possibly) higher hosting costs. Although they probably spend most of their time on the application layer, I suspect the most important and trickiest work was done to scale the database.
- ericb 3y ago> I need you to send 5-10 million API calls per day to 20 different API’s … are you using Rails? Yes.
- canadianfella 3y ago[dead]