Pergunta

How WSO2 CEP or BAM can be load balanced ? What configuration changes required to make it in clustered mode (active-active).

How publisher can send events over Thrift to this clustered server, please provide example.

Foi útil?

Solução

BAM or CEP can be simply load balanced by changing the Connection URL string.

In single server mode (without load balancing) the Connection URL is as follows;

tcp://10.100.3.97:7611

When load balancing is required you need to connect to multiple BAM/CEP servers. Note that this load balancing is done at the client side of Data Agent, in Round Robin manner, as WSO2 Load Balancer is not supported with Thrift protocol.

If you need to connect to multiple BAM/CEP servers with load balancing as mentioned above, you can enter the comma separated connection URLs of each server as follows.

tcp://10.200.3.218:7611, tcp://10.100.3.97:7611, tcp://10.300.3.197:7611

Each message received from the Data Agent client will be directed to each URL in Round Robin manner which will cause the load balancing.

Now let's consider a case where you want to send the same message to both BAM and CEP servers simultaneously. URLs related to BAM and CEP servers (where there are 2 BAM servers and 3 CEP servers) can be given as follows to load balance messages.

{tcp://10.200.3.218:7611, tcp://10.100.3.97:7611, tcp://10.300.3.197:7611}, {tcp://10.400.3.297:7611, tcp://10.500.3.597:7611}

Note that three URLs in the first braces are related to 3 CEP servers and other 2 to the 2 BAM servers.

After you enter the corresponding Connection URLs to configure data agents as mentioned above, you can publish as usual. Messages will be switched to each server in Round Robin manner automatically.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top