3 ms·
> Rails costs 2-3x more $ than other servers because of its poor performance. That's just not true. The vast majority of time for most web apps is spent in da
by ericb 4y ago
> Rails costs 2-3x more $ than other servers because of its poor performance.
That's just not true.
The vast majority of time for most web apps is spent in database calls. A typical runner up on time spent is remote system calls, which, if you accept the monolith tenet that maybe you don't need those, are minimised in a Rails app.
If your app does anything meaningful, typically, that "meaningful stuff" so massively dwarfs the part of the time "in Rails" that worrying about the framework time is optimizing the wrong order of magnitude. I base this claim on looking at multiple real-world Java, Node, and Rails apps in New Relic, and during performance testing. Hint: the rails app outperformed both.
Oh, wait--do you mean server costs? If you are talking about 2-3x more in servers, perhaps.
Have you compared dev salaries to server costs, though? Here again, you'd be optimizing a small cost when you should be optimizing the big costs that matter.
- stevebmark 4y ago> The vast majority of time for most web apps is spent in database calls. Which is why I wouldn't reach for a webserver that can only handle one request at a time per process
- andrewmutz 4y agoRails can use either threads or processes for parallelism.
- stevebmark 4y agoSure, and Gitlab doesn't, because it's not practical
- andrewmutz 4y agoWhy isn't it practical?
- ericb 4y agoWell, I developed and now manage dev for a Rails app that has half a million customers, with holiday demand peak times, etc. I haven't lost a night's sleep in the almost 10 years to the app. I'm interested in what impracticalities are involved in our threaded deployment of Rails?
- stevebmark 4y agoHow do you get Rails models querying the db to use threads and not block the whole process from accepting other requests?
- ericb 4y agoTake a look into the ActiveRecord connection pool: https://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/ConnectionPool.html https://api.rubyonrails.org/classes/ActiveRecord/ConnectionA...