Load balancing and endpoints

Posted by memento13 on 19-Sep-2011 05:46

Hi,

I'm trying to deploy ESB on two machines with both machines having brokers configured as cluster:

Machine1:

Broker1 (Cluster1), EsbContainer1

Machine2:

Broker2 (Cluster1), EsbContainer2

What I would like, is that EsbContainer1 would use only Broker1 and EsbContainer2 only Broker2 (to avoid network traffic). There doesn't seem to be a way to configure JMS connection in container level. There is ESB (JMS) configuration option, but according to manual this is used only for web services.

Another option would be to loadbalance all traffic between Broker1 and Broker2, but JMS connections are made at startup and they aren't always load balanced equally. This happens when jms connection has Maximum Receive Sessions Per Connection=Unlimited configured.

When I use Maximum ReceiveSessions Per Connection=Single, then performance degrades awfully.

Does anybody have any suggestions?

Thanks

All Replies

Posted by kjervis on 19-Sep-2011 07:42

Hi Romet,

The general advice from Professional Services when approaching this problem is to introduce another level of indirection with regards to the hostname used to connect to the broker(s).  Typically this is in the form of using a logical host value in the connection URL and having the logical value resolve differently depending on the machine that is hosting the ESBContainer.  Host resolution can be acheived through the local host file on the system where the ESBContainer(s) reside (Windows: C:\Windows\System32\drivers\etc or Solaris/Linux: /etc/hosts).

So fo example the Connection URL could use somthing like the following:

tcp://localbroker:2506

Then on machine one it would have a hosts file containing a host entry that mapped localbroker to the ip address of the relevant broker (i.e broker 1).  On the second machine it would have a hosts file containing a host entry that mapped localbroker to the ip address of the relevant broker (i.e. broker 2).

The same technique can also be used with fault-tolerant connection URL's that contain multiple hosts to provide a preference for connecting a local/data-centre specific broker (assuming you are using sequential connection list).

Alternatively you can apply a similar technique to your internal DNS server configuration such that the DNS server will give out different responses (IP addresses) based on the source address, or some other characteristic of the DNS query.

Hope this helps,

Kevin

Note: the term localbroker has been used to illustrate the preference for one broker over another.  It is no intended to imply the broker is co-located with the ESBContainer, nor use of the local loop back address!

This thread is closed