简体   繁体   English

多个组织的系统设计

[英]System design for multiple organisations

At the company I work for, we develop and host a CRM system for multiple organisations where the database is segregated - ie our clients do not share 1 large database similar to Facebook, we have separate databases per client, but the same CRM software. 在我工作的公司,我们为多个组织开发和托管CRM系统,其中数据库是隔离的 - 即我们的客户不共享1个类似于Facebook的大型数据库,我们每个客户端都有单独的数据库,但是相同的CRM软件。 All other system aspects such as caching are organisation specific. 所有其他系统方面(如缓存)都是特定于组织的。

We're migrating our servers onto AWS and this has given us an opportunity to think about the infrastructure. 我们正在将我们的服务器迁移到AWS上,这使我们有机会考虑基础架构。

Our base system is written using the CodeIgniter framework, so we're thinking instead of having multiple instances of the same CRM, creating a single instance and attaching the relevant database credentials depending upon hostname / user account (this method, the CRM would be accessed via a dedicated URL). 我们的基本系统是使用CodeIgniter框架编写的,因此我们考虑的是不是拥有相同CRM的多个实例,创建单个实例并根据主机名/用户帐户附加相关的数据库凭据(此方法,将访问CRM)通过专用URL)。 Eg if user A works for company B, we'll connect to company B's databases and not company C. This example would also help with our versioning control. 例如,如果用户A在公司B工作,我们将连接到公司B的数据库而不是公司C.这个例子也有助于我们的版本控制。

I'm just wondering if others have had a similar experience, and whether the general feeling is to keep instances completely segregated or migrate to a true "software as a service" single instance method? 我只是想知道其他人是否有类似的经历,以及一般的感觉是保持实例完全隔离还是迁移到真正的“软件即服务”单实例方法?

it realy depends on DB sizes and traffic. 它真的取决于数据库大小和流量。 If you have got a lot of traffic, separate DBs are better as you can easily move them out on to their own server instances if they need more resources + it is easyer to manage. 如果您拥有大量流量,那么单独的数据库会更好,因为如果他们需要更多资源,您可以轻松地将它们移到自己的服务器实例上,而且管理起来更容易。 If you don't have a lot of traffic, you can use one DB but that is risky if you need to do something company specific specific. 如果您没有大量流量,则可以使用一个数据库,但如果您需要执行特定于公司的某些操作,则存在风险。 Code wise, a single instance is much easier to maintain because you would not have to roll out changes for every instance individually, and if your server hits capacity, simply slap on a load balancer and spin up more instances of the same webserver ()keep in mind DBs should be on separate server/s. 代码方面,单个实例更容易维护,因为您不必单独为每个实例推出更改,如果您的服务器达到容量,只需打开负载均衡器并启动同一个Web服务器的更多实例()保持记住DB应该在不同的服务器上。

The author of this thread already accepted proposal as answer. 该主题的作者已接受提案作为答案。 However, I recommend you to read on multi-tenant architecture which will guide you more. 但是,我建议您阅读multi-tenant architecture ,它将为您提供更多指导。 Here you could associate individual companies as tenants. 在这里,您可以将各个公司关联为租户。

There are several important considerations in choosing a multi-tencancy or single-tenancy architecture, including: 选择多租户或单租户架构有几个重要的考虑因素,包括:

  • Security - can you effectively segregate data, access, permissions etc. in a multi-tenancy environment? 安全性 - 您是否可以在多租户环境中有效地隔离数据,访问权限等?
  • Infrastructure costs - will you be able to effectively utilise server/platform capacity with a single tenants? 基础设施成本 - 您是否能够通过单个租户有效利用服务器/平台容量? On AWS, scaling can help with this. 在AWS上,扩展可以帮助解决这个问题。
  • Licensing costs - are there significant additional license costs in a single-tenanted environment (normally more servers means more licenses)? 许可成本 - 在单租户环境中是否存在大量额外许可成本(通常更多服务器意味着更多许可)?
  • Effort/cost to implement and maintain - will a single-tenant solution require significantly more effort to manage deployments and maintain the infrastructure? 实施和维护的努力/成本 - 单租户解决方案是否需要更多的工作来管理部署和维护基础架构?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM