Ruby on Rails 应用程序中的 SaaS
我想在 SaaS 架构中构建 RoR Web 应用程序。我应该为每个客户端使用一个数据库还是为每个客户端使用多个数据库。我还想知道每个客户端是否应该在子域上使用自己独立的应用程序。虽然这取决于业务逻辑,但我想了解如何选择正确的方法以及最佳实践是什么。
谢谢,
I want to build a RoR web application in SaaS architecture. Should I have a single database for every clients or multiple databases for each client. And also I wonder that each client should use the own separated application on sub domain or not. Although it depends on business logic but I want to learn how I can choose the correct way and what the best practice is.
Thanks,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这里没有正确答案。第一个解决方案是让每个客户端完全独立:他们自己的应用程序空间和数据库。
但是,您可能想要设计一个对所有客户通用的框架,并且只需更改每个客户的品牌即可。这样做的缺点是您需要付出努力将它们分开 - 例如交叉污染和安全。
There is no correct answer here. The first solution would be to have each client completely independent: their own application space and database.
However, you may want to design a framework which is common to all clients, and just change the branding for each client. The downside of this is the effort you need to keep them separated - for instance cross-contamination and security.