推荐哪种多租户方法 [英] Which Multi-tenant approach is recommended

查看:119
本文介绍了推荐哪种多租户方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据多租户数据架构文章,有3种方法可以实现多租户

As per Multi-Tenant Data Architecture post, there are 3 ways to implement multi-tenancy

  1. 单独的数据库

  1. Separate Databases

共享数据库,独立的模式

Shared Database, Separate Schemas

共享数据库,共享架构

我有以下详细信息:

  1. 用户应该能够备份和还原其数据.

  1. User should be able to backup and restore their data.

租户数:3(约)

每个租户可能属于不同的域(URL).

Each tenant might belong to different domain(url).

所有租户都有一些公用表.

There are some common tables for all the tenants.

每个租户中的表数:10(初始)

No of tables in each tenant: 10 (initial)

我想知道哪种方法更适合我?

I would like to know which approach is more suitable for me?

推荐答案

我的系统中存在相同的问题.我们的广告网络系统加班时间变得非常大,因此我正在考虑将每个发布商迁移到多租户架构.

I had the same issue in my system. We had an ad-network system that became pretty large overtime, so I was considering migration to multi-tenant architecture per publisher.

选项3 无关紧要,因为某些发布者有特殊要求(其他列/程序,并且我们不支持分区). 选项2 无关紧要,因为我们在客户之间存在并发和负载问题.为了达到高性能,并计划扩展到1000个发布者,使用20个小部件和高并发性,我们唯一的解决方案是选项1 -分离数据库.

Option 3 wasn't relevant as some publishers had special requirements (additional columns/procedures and we are not supporting partitioning). Option 2 wasn't relevant since we had concurrency and load issues between customers. In order to reach high performance, with plans to scale-out up to 1000 publishers, with 20 widgets and high concurrency, Our only solution was Option 1 - Separate Databases.

我们已经迁移到此模式,并且我们有10个数据库正在运行,并且具有用于配置和广告的共享数据库.从性能上来说,它很棒.从高可用性来看,它也非常好,因为每个发布者的流量都不会影响其他所有流量.由于我们拥有模板环境,因此对我们而言,添加新发布者是一个简单的步骤.我们唯一的问题是维护.

We already migrated to this mode, and we have 10 databases running, with a shared database for configuration and ads. From performance, it is great. From high availability, it is also very good as each publisher traffic doesn't effect all the other. Adding new publisher is an easy step for us, as we have our template environment. The only issue we have is Maintenance.

最近我一直在阅读有关 PartitionDB 的信息,它看起来很简单您可以拥有一个门数据库来执行所有维护工作,包括升级和顶级查询.它支持常见的共享数据库(与我们相同),我现在尝试了解如何使用 stand单独的数据库.

Lately I've been reading about PartitionDB, It looks very simple to manage as you can have a gate database to perform all maintenance works including upgrades and top level queries. It supports common shared database (same we have already), and I am trying now to understand how to use the stand alone database as well.

这篇关于推荐哪种多租户方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆