0
votes

I have deployed API manager 2.1.0 All-in-one on 2 VMs. I am using PostgreSQL as DB which is on separate VM and I am sharing the databases as mentioned in the document. Now I am trying to cluster these 2 nodes as mentioned in this document. There are few things which are not clear to me from this document. I am assuming both nodes will work as manager. (What is basic difference between manager and worker?)

1.Under step 6 do we have mention remote instance or leave this as localhost?

<remoteInstance url="https://localhost:9453/registry">
  1. I am assuming we have to create VIP for all the ports mentioned in the table?

  2. Step 11.c do we have to mention any domain which we are using or leave this as is?

<parameter name="domain">wso2.pub.store.domain</parameter>

4.Step 12 In Which file do we have make changes? Why we are pointing both publishers to same Gateway node? What happens in the case this Gateway goes down?

  1. How and on which node do we setup Rsync?
  2. Step 15 As we are using 2 separate node what do we configure in place of "localhost" on each node and I am assuming we will be using port 5672.

    connectionfactory.TopicConnectionFactory = amqp://admin:admin@clientid/carbon?brokerlist='tcp://localhost:5673'

    connectionfactory.QueueConnectionFactory = amqp://admin:admin@clientID/test?brokerlist='tcp://localhost:5673'

    topic.throttleData = throttleData

  3. Step 17 Do we have change anything in JMSEventPublisher according to our setup or leave this as is?

Also these are the only changes we need to make in order to cluster 2 all-in-one nodes in active-active mode or are there any additional configuration we need to make?

And how do we test if the cluster is working?

1
+ you need a SVN server to synchronize the deployment. For the throttling - I believe each node needs to have its own database for proper functionalitygusto2

1 Answers

0
votes

If you take API Manager, manager and worker concept is gateway nodes. When you publish an API, Synapse configuration will be pushed to the gateway manager. You can use SVN based deployment synchronization, Rsync or any other mechanism to sync artifacts between gateway manager and worker nodes. Once you published an API, gateway worker nodes will get the Synapse artifact from the manager node. In general, gateway worker nodes will serve the API requests and manager node will not be used.

  1. You can keep that as localhost.
  2. This depends on your use case.
  3. This domain value is used in clustering the nodes. Specify any domain name in both nodes.
  4. This change should be done in api-manager.xml file. You can use the load balancer IP addresse/hostname for this if you can manage the artifacts. If you use SVN and allow both nodes to commit changes, conflicts can occur.
  5. If you are using Rsync, manager node will be the node which you select in step 12 in the guide.
  6. This guide is explained considering that both servers are running on the same machine with port offsets. If you are running servers with IP1,port1 and IP2,port2 do the following.

Create jndi2.properties file in both servers. In node1, use IP2,port2 and in node2 use IP1,port1. The main concern is that node1 should be aware of node2 and vise verse.

  1. You need to create the JMSEventPublisher in both nodes. If you check the JMSEventPublisher, it refers the jndi2.properties file which you created in step 14.

To test the cluster, simply you can create an API and test the basic flow. Additionally, you can test on throttling scenarios.