1 Reply Latest reply on Sep 27, 2012 9:42 AM by Ramesh Reddy

    TEIID and Load Balancing

    luca gioppo Novice

      Can you explain a bit more how to load balance a clustered TEIID installation?

      Use case:

      JBoss AS 7.1.1 + TEIID 8.1


      JBoss clustered (profile HA and dedicated server group) so two different hosts are there:


      Was it a simple war with a third host with http + mod_cluster I could achieve load balancing.


      Since I'm connecting to a VDB using JDBC How do I load balance (which is the equivalent option of mod_cluster for http?)

      It seems that the TEIID connector is able to do something on itself, but is not clear to me.

      Do I have to use a load balancer (let's say nginx to do the pure tcp balancing and pointing the connector to the balancer address)?

      Am I assured that caching is consistent on all nodes and that all will work well and scale for performance and fail over?


      In the docs there is this example of data source for load balancing:

      What {host} do we have to use since there will be at least two nodes in the cluster?



              <datasource jndi-name="java:/teiidDS" pool-name="teiidDS">







                      <check-valid-connection-sql>SET NEWINSTANCE TRUE</check-valid-connection-sql>








                  <driver name="teiid" module="org.jboss.teiid.client">







      There is also this statement:

      "You may also choose to use an external tcp load balancer, such as haproxy. The Teiid driver/DataSource should then typically be configured to just use the single host/port of your load balancer"


      Is it possible to have a more "prescriptive" way of setting the cluster (not may but must)?

      The option of the data source seems nice and easy (no third haproxy/nginx server around) but I get confused by the first statment:




      The comma separated host is not present in the datasource so ...



        • 1. Re: TEIID and Load Balancing
          Ramesh Reddy Master



          There is no one prescriptive way. Multiple host/port combinations on the URL is our built in way, that may satisfy your needs. HAProxy is another option, where if you have nodes are coming in and going out all the time then  you have single place you can configure all the node information, instead of at every single client.


          As per clustering the AS7 just follow the AS7 documents. Also note the installtion of Teiid in Domain mode is different check the Admin Guide. I would very much like you to test this out and give us feed back on domain mode.