Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Thread safety in Rails is a total pain in the ass. So many libraries out there are not thread safe. I have worked with many large rails codebases and there always are gems that somehow work their way in with major threading issues. I think its a legitimate strategy to run rails apps single threaded and multi process. Not necessarily for all apps or workloads of course.


This is utterly false in my experience. The popularity of Puma and Sidekiq mean that threading issues are quickly found and fixed.


Yeah I agree. Thread safety in ruby is a non issue these days. Maybe this is 10 years out of date experience?


How does Puma help with the libraries that are not thread safe?


I think he's saying threading issues are more likely to be found and fixed these days given the context in which most ruby libraries are running.


Multiprocess is more often than not better for latency anyway. Otherwise a big serialization or other cpu clog will block up the other, potentially quick, requests on the same process.

Much has been written about this.


Could JRuby help ?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: