The WSO2 Elastic Load Balancer is now retired. We recommend that you use Nginx to front your deployment. See Clustering WSO2 products without WSO2 ELB.
FAQ - Elastic Load Balancer 2.1.0 - WSO2 Documentation
Skip to end of metadata
Go to start of metadata

Do we recommend installing ELB features into other products and use as Load Balancer?

No, the ELB should not be dispatching requests on to itself.

How do I make the ELB highly available?

Create an ELB cluster and route the requests to them through a hardware load balancer.

Why do we set 'port.mapping' property and how to use is properly?

In a dynamically clustered set-up where you front a carbon instance using an ELB, it is a responsibility of a Carbon server to send its information to ELB. You can visualize this as a "Member object somehow getting passed to ELB from Carbon server instance". In Carbon server's clustering section, under properties, you can define any Member property. This way, you can let ELB know about the information other than the basic ones. What are the basic information, you might think. Typically those are host name, http port, https port etc.

ESB, API-M etc. are bit special w.r.t. ports since they usually have 2 http ports (compare to 1 http port of AS). Hence, here we have to somehow send this additional information to ELB. Easiest way to do that is by setting a member property. Here, we use port.mapping property. Also, in order to front these special servers we need 2 http ports in ELB too, which are exposed to outside. There's a deployment decision to be made here, i.e. which http port of ELB should map to which http port of the server (i.e. servelet http port or Nhttp http port). With that in mind, let me explain, how you should use this port.mapping property.

Let me consider only the http scenario. Say, in your API-M instance, you have used 8280 as the Nhttp transport port and 9763 as the Servelet transport port. Also ELB has 2 http ports one is 8280 and the other is 8290. Imagine there's a Member object, and in this case Member's http port would be 8280 (usually the port defined in axis2.xml gets here). But since ELB has 2 ports, there's no way to correctly map ports, by only specifying Member's http port. There arises the importance of port.mapping property. You have to think this property from the perspective of ELB.

<property name="port.mapping.8290" value="9763"/>

Let's assume we define the above property, now this means, if a request comes to ELB, in its 8290 port (see... we're thinking from ELB's perspective), forward that request to the 9763 port of the Member. Having only this property is enough, we do not need following property,

 <property name="port.mapping.8280" value="8280"/>

Let me explain why. The logic was written in a way, that port.mapping properties get higher precedence over the default ports. This means, that when a request comes to ELB, ELB will first check whether the port it received the request from, is specified as a port.mapping property. If it is, it will grab the target port from that property. If not, it will send the request to the default http port. Hence, if a request received to the 8280 port of ELB, it will be automatically get redirected to 8280 port of the Member (since it's the http port of Member).

Similarly, we should define a mapping for https servelet port.

What's the purpose of 'localMemberHost' and 'localMemberBindAddress' parameter?

Via localMemberHost property you can set the IP that you want your ESB to be advertized to ELB. Via localMemberBindAddress property you can bound the ESB to the network it belongs to.

<parameter name="localMemberHost">192.168.30.x</parameter>

<parameter name="localMemberBindAddress"></parameter>

  • No labels