If you are sure that the relationship between objects and subdomains will always be individual, I would choose option 1. If objects can be associated with several subdomains in the future, you are tied to option 2. This carries more overhead, but is easily managed by using something something like cancan.
I would stay away from option 3 for the reasons you mentioned. Rails doesnβt have many databases running, and in addition, using multiple databases in one application does not guarantee more security than other options.
Martijn
source share