简体   繁体   English

Citus PostgreSQL 单机集群到多租户数据库的多机集群

[英]Citus PostgreSQL single machine cluster to multi machine cluster for Multi-tenant Databse

Design a Database Architecture for a Multi-tenant Application ️ with the following Criteria:使用以下标准为多租户应用程序设计数据库架构:


Multiple Tenant Types ( different schema for each Tenant with around 20 tables each)多种租户类型(每个租户的不同架构,每个租户大约 20 个表)
starting with 2 should scale to 50+ Tenant Types从 2 开始应该扩展到 50+ 租户类型
Each Tenant Type starting with 20 should scale to 1000 Tenants with 50 to 500 users each每个从 20 开始的租户类型应扩展到 1000 个租户,每个租户有 50 到 500 个用户
Data isolation is not crucial数据隔离不是关键
Cost of ownership at least, in the beginning, should be super low拥有成本至少在一开始应该是超低的

What would be an ideal choice based on these criteria?根据这些标准,什么是理想的选择?


My choice:我的选择:
Citus PostgreSQL with a Different schema/Database per Tenant type and sharding tenants, running the server on a VM. Citus PostgreSQL 每个租户类型和分片租户具有不同的架构/数据库,在 VM 上运行服务器。 Now Citus has 2 deployment types ie..Single machine cluster and Multi-machine cluster现在 Citus 有 2 种部署类型,即..单机集群和多机集群

Can we start with a Single machine cluster initially thereby saving some bucks, and them convert to Multi-machine cluster later on with no or minimal downtime?我们是否可以从最初的单机集群开始,从而节省一些钱,然后在没有停机时间或停机时间最短的情况下转换为多机集群?
so from there we can scale out horizontally adding new physical worker node instances.所以从那里我们可以横向扩展添加新的物理工作节点实例。

Switching from single machine to multi machine should be possible, details will vary depending on your exact environment.应该可以从单机切换到多机,详细信息将根据您的具体环境而有所不同。 At worst you should be able to replicate the worker databases from the single machine to new machines & then switch to using those new machines在最坏的情况下,您应该能够将工作数据库从单台机器复制到新机器,然后切换到使用这些新机器

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

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