Ruby on Rails
Sunday, August 11, 2019
About 30 seconds of googling found that "IO operations such as database calls, interacting with the file system, or making external http calls will not lock the GIL." Unless you're frequently using up your thread pool and forcing requests to wait for an available worker, it seems like you shouldn't have a problem. If you are filling up your thread pool and forcing requests to wait, then you have a different problem you should maybe solve rather than bandaid. Unless your actual use case is bursts of simultaneous requests which fill your worker pool no matter how large, it seems like you might be over-thinking this.
On Saturday, August 10, 2019 at 9:56:21 PM UTC-7, San Ji wrote:
-- Jim Crate
On Saturday, August 10, 2019 at 9:56:21 PM UTC-7, San Ji wrote:
Thank you, PhilThe latter suggestion is actually what I planned to do, with nginx handle the path routing instead of having separated endpoints.May I ask why did you switch away from the approach?IMHO, the approach is safer than mixing every request up in a single pool.As I described, the locking is quite rare but possible, probably won't show up at all in practice, but still.
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/c43538a2-2b3b-469e-acaa-1cdaaf1cc04f%40googlegroups.com.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment