1
votes

I would like to have a cluster of gateway in api manager. I saw the documents how to split the 4 components with mysql, I saw also the document explaining how to cluster the api gateway (Mgt / Worker) but I miss some information: Is it necessary that both clusters connect to the same database or each cluster can/must have is own database?

A image is better than words:

Load Balancer - Round robin - chart

So what I would like to do is to have 1 KeyManager, 1 store and 1 publisher and 2 Gateways. SO when I publish 1 endpoint it is available on both gateways (I will use host file the specify hostnames instead of ip). I don't know if it is possible that kind of configuration.

Another possibility is to have a shared keyManager between both wso2 servers. When the user has his authorization key he can use both wso2 servers.

2

2 Answers

1
votes

You should share databases among clusters. Basically there are 3 databases used. UserDB, registryDB, APImanager DB. If you want to allow same users to login/publish APIs (for example) you must share UserDB among clusters. Same thing applies to other DBs too.

0
votes

When you cluster the gateway you should consider following

  1. if your are using muti-tenancy then point all gateway nodes should be pointed to usermgt db and registry db

  2. if no muti-tenancy all gaetway nodes should be pointed to registry db(because there you will have tier.xml ,so when adding custom tier.xml it should be synced with all gateway nodes)

gateway doesn't use apimgt db , but you need to have the config of apimgt db which points to default h2 db,other wise you will get error when start the gateway node.