4 ms·
> 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 t
by 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...