简体   繁体   English

我必须为这样的 WSO2 EI 两节点集群创建多少和哪些数据库(每个节点包含 ESB 和 MB 配置文件)

[英]How many and what databases I have to create for a WSO2 EI two node cluster like this (each node contains ESB and MB profiles)

I am installing a WSO2 EI two nodes cluster and I have some doubts about the number of databases that have to be created.我正在安装一个 WSO2 EI 两节点集群,我对必须创建的数据库数量有一些疑问。

I will try to explain my situation as best that I can: I am using WSO2 EI 6.5.0 .我会尽量解释我的情况:我使用的是WSO2 EI 6.5.0

I have two nodes cluster.我有两个节点集群。 Each node contains the ESB and the MB profile.每个节点都包含ESBMB配置文件。 I will create the needed databases on a Microsoft SQL Server cluster DB.我将在Microsoft SQL Server集群 DB 上创建所需的数据库。

So I have this situation:所以我有这种情况:

NODE 1: ESB AND MB节点 1:ESB 和 MB

NODE 2: ESB AND MB节点 2:ESB 和 MB

Reading on the official documentation:阅读官方文档:

CLUSTERING WSO2 ESB PROFILE: https://docs.wso2.com/display/EI650/Clustered+Deployment集群 WSO2 ESB 配置文件: https : //docs.wso2.com/display/EI650/Clustered+Deployment

CLUSTERING WSO2 MB PROFILE: https://docs.wso2.com/display/EI650/Clustering+the+Message+Broker+Profile聚类 WSO2 MB 配置文件: https : //docs.wso2.com/display/EI650/Clustering+the+Message+Broker+Profile

I can found information of the DBs needed by ESB and MB profiles.我可以找到 ESB 和 MB 配置文件所需的 DB 的信息。 In particular ESB profile need the creation of these 4 databases:特别是ESB配置文件需要创建这 4 个数据库:

  • WSO2_USER_DB: JDBC user store and authorization manager. WSO2_USER_DB: JDBC 用户存储和授权管理器。
  • REGISTRY_DB: Shared database for config and governance registry mounts in the product's nodes. REGISTRY_DB:用于在产品节点中安装的配置和治理注册表的共享数据库。
  • REGISTRY_LOCAL1: Local registry space in Node 1. REGISTRY_LOCAL1:节点 1 中的本地注册表空间。
  • REGISTRY_LOCAL2: Local registry space in Node 2. REGISTRY_LOCAL2:节点 2 中的本地注册表空间。

while MB profile need the following 5 databases:MB配置文件需要以下 5 个数据库:

  • WSO2_USER_DB: JDBC user store and authorization manager. WSO2_USER_DB: JDBC 用户存储和授权管理器。
  • REGISTRY_DB: Shared database for config and governance registry mounts in the product's nodes. REGISTRY_DB:用于在产品节点中安装的配置和治理注册表的共享数据库。
  • REGISTRY_LOCAL1: Local registry space in Node 1. REGISTRY_LOCAL1:节点 1 中的本地注册表空间。
  • REGISTRY_LOCAL2: Local registry space in Node 2. REGISTRY_LOCAL2:节点 2 中的本地注册表空间。
  • MB_DB: Stores instance data that are specific to the message broker profile. MB_DB:存储特定于消息代理配置文件的实例数据。

So it appears that the first 4 databases are the same between the ESB and MB profiles and that the MB profiles uses an addictional database named MB_DB .所以看来第4个数据库是ESBMB型材之间以及相同的MB型材使用名为MB_DB的addictional数据库。

And here my doubt: in a situation like the one that I have (2 nodes cluster that both contains ESB and MB profiles) how many databases have do I have to create?我的疑问是:在我所拥有的情况(包含ESBMB配置文件的 2 个节点集群)中,我必须创建多少个数据库?

My original idea was 5 databases because I thought that the first 4 databases are shared between ESB and MB profiles but now I have the following doubt: in theory (correct me if I am doing wrong assertion) both ESB and MB may use same user database and registry but checking the default H2 setup we have that:我最初的想法是 5 个数据库,因为我认为前 4 个数据库在ESBMB配置文件之间共享,但现在我有以下疑问:理论上(如果我断言错误,请纠正我) ESB 和 MB 可能使用相同的用户数据库和注册表,但检查默认的H2设置,我们有:

  • ESB profile use one database placed in /usr/lib/wso2/wso2ei/6.5.0/repository/database/ ESB配置文件使用一个放在/usr/lib/wso2/wso2ei/6.5.0/repository/database/ 中的数据库
  • MB profile use one database placed in /usr/lib/wso2/wso2ei/6.5.0/wso2/broker/repository/database/ MB配置文件使用一个数据库放在/usr/lib/wso2/wso2ei/6.5.0/wso2/broker/repository/database/

So in theory it should mean that it is better to do not mix databases between profile/products.所以理论上应该意味着最好不要在配置文件/产品之间混合数据库。

So what exactly I should do?那么我到底应该怎么做呢? How many and what databases I have to create?我必须创建多少和哪些数据库?

I am now thinking that maybe I have to completly separate the ESB and MB profiles databases using prefix, something like this:我现在在想,也许我必须使用前缀完全分离ESBMB配置文件数据库,如下所示:

ESB profile databases: I have to create these 4 databases: ESB配置文件数据库:我必须创建这 4 个数据库:

  • ESB_WSO2_USER_DB ESB_WSO2_USER_DB
  • ESB_REGISTRY_DB ESB_REGISTRY_DB
  • ESB_REGISTRY_LOCAL1 ESB_REGISTRY_LOCAL1
  • ESB_REGISTRY_LOCAL2 ESB_REGISTRY_LOCAL2

MB profiles databases: I have to create these 5 databases; MB配置文件数据库:我必须创建这 5 个数据库;

  • MB_WSO2_USER_DB MB_WSO2_USER_DB
  • MB_REGISTRY_DB MB_REGISTRY_DB
  • MB_REGISTRY_LOCAL1 MB_REGISTRY_LOCAL1
  • MB_REGISTRY_LOCAL2 MB_REGISTRY_LOCAL2
  • WSO2_MB (specific for MB profile so I am not using a reduntant suffix) WSO2_MB (特定于MB配置文件,所以我没有使用冗余后缀)

Could this be a good solution?这可能是一个很好的解决方案吗? But in this way I will have completlely separate dbs and not shared information for users and registry.但通过这种方式,我将拥有完全独立的数据库,而不是用户和注册表的共享信息。

What is the best practice in a case like a two nodes cluster like mine?在像我这样的两个节点集群的情况下,最佳实践是什么?

Thank you谢谢

As you said, it is fine to keep separate databases.正如您所说,保留单独的数据库是可以的。 And what usually does is creating databases with a prefix as you mentioned.通常所做的是创建带有您提到的前缀的数据库。

However, let's say if its only one set of users that will be accessing both ESB and MB, then you can go ahead and point a single userdb from the both products (means all the four instances running in 2 nodes).但是,假设只有一组用户将同时访问 ESB 和 MB,那么您可以继续并从这两个产品中指向单个 userdb(意味着所有四个实例都在 2 个节点中运行)。

Regarding the registry database, let say if you have a configuration file that needs to be access from both ESB and MB, then you have to share a single registry_db (and also have to follow the proper registry mounting / see the docs for that).关于注册表数据库,假设您有一个需要从 ESB 和 MB 访问的配置文件,那么您必须共享一个 registry_db(并且还必须遵循正确的注册表安装/查看相关文档)。 If there is no such case, it is best to keep separate databases.如果没有这种情况,最好保留单独的数据库。

Bottom line: As long as there is nothing to be shared between ESB and MB internally, it is best to maintain a separate set of databases.底线:只要 ESB 和 MB 在内部没有什么可共享的,最好维护一组单独的数据库。 You only need to follow clustering and share databases only between the instances of the same product.您只需要遵循集群并仅在同一产品的实例之间共享数据库。

Cheers!干杯!

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

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