简体   繁体   中英

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.

I will try to explain my situation as best that I can: I am using WSO2 EI 6.5.0 .

I have two nodes cluster. Each node contains the ESB and the MB profile. I will create the needed databases on a Microsoft SQL Server cluster DB.

So I have this situation:

NODE 1: ESB AND MB

NODE 2: ESB AND MB

Reading on the official documentation:

CLUSTERING WSO2 ESB PROFILE: https://docs.wso2.com/display/EI650/Clustered+Deployment

CLUSTERING WSO2 MB PROFILE: https://docs.wso2.com/display/EI650/Clustering+the+Message+Broker+Profile

I can found information of the DBs needed by ESB and MB profiles. In particular ESB profile need the creation of these 4 databases:

  • WSO2_USER_DB: JDBC user store and authorization manager.
  • REGISTRY_DB: Shared database for config and governance registry mounts in the product's nodes.
  • REGISTRY_LOCAL1: Local registry space in Node 1.
  • REGISTRY_LOCAL2: Local registry space in Node 2.

while MB profile need the following 5 databases:

  • WSO2_USER_DB: JDBC user store and authorization manager.
  • REGISTRY_DB: Shared database for config and governance registry mounts in the product's nodes.
  • REGISTRY_LOCAL1: Local registry space in Node 1.
  • REGISTRY_LOCAL2: Local registry space in Node 2.
  • MB_DB: Stores instance data that are specific to the message broker profile.

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 .

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?

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:

  • ESB profile use one database placed in /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/

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:

ESB profile databases: I have to create these 4 databases:

  • ESB_WSO2_USER_DB
  • ESB_REGISTRY_DB
  • ESB_REGISTRY_LOCAL1
  • ESB_REGISTRY_LOCAL2

MB profiles databases: I have to create these 5 databases;

  • MB_WSO2_USER_DB
  • MB_REGISTRY_DB
  • MB_REGISTRY_LOCAL1
  • MB_REGISTRY_LOCAL2
  • WSO2_MB (specific for MB profile so I am not using a reduntant suffix)

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).

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). 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. You only need to follow clustering and share databases only between the instances of the same product.

Cheers!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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