Sorry for creating this issue. I don't know where else can I ask. So, I'll leave my question here.
Recently, we started a new project using puma. According to our need, we have to make it support multi-tenancy. But, again, we have to make sure it's thread safe.
Sorry for creating this issue. I don't know where else can I ask. So, I'll leave my question here.
Recently, we started a new project using puma. According to our need, we have to make it support multi-tenancy. But, again, we have to make sure it's thread safe.
Here's a old solution: http://railscasts.com/episodes/388-multitenancy-with-scopes But, I think it's not thread safe because it uses class variable. (Correct me if I'm wrong.)
And, then, we found Apartment. But, after some research on this, I still can't figure out if it's really thread safe and compatible with puma.
Can you please give me a official answer of Is Apartment thread safe? Thank you so much!
My Environment:
Database: MySQL
Rails (or ActiveRecord) version: 5.2
Ruby version: 2.3.1
App server: puma