Showing posts with label load balancing. Show all posts
Showing posts with label load balancing. Show all posts

Monday, April 19, 2010

Using the UltraESB to proxy and load balance requests to Tomcat

Here is a complete article that describes how the UltraESB can be used to proxy requests between multiple Tomcat instances with load balancing and fail-over using sticky sessions. The mediation.getJvmRoute() API call makes it simple to query the Tomcat jvmRoute when using a JSESSIONID cookie or a jsessionid path segment. This value can then be used to load balance with fail-over between multiple instances of Tomcat.

http://bit.ly/aZL4sU

Wednesday, April 7, 2010

Replacing an F5 and its iRules with the UltraESB

A user will soon be replacing an F5 Big IP with the UltraESB by re-writing the iRules as mediation logic. This creates a proxy service that will intercept all requests using the url pattern "*", and then use cookies for routing into two backend server pools where the load is split between two federated groups. This incidentally allows them to also replace Apache servers used to front the Tomcat servers.

The complete configuration used is along the lines of the following;

<u:proxy id="web-proxy">
    <u:transport id="http-8280">
        <u:property name="url" value="*"/>
    </u:transport>
<u:target>
    <u:inSequence>
        <u:java><![CDATA[
            String pool = mediation.getCookie(msg, "POOL");
            if ("TWO".equals(pool)) {
                mediation.sendToEndpoint(msg, "ep2");
            } else {
                mediation.sendToEndpoint(msg, "ep1");
            }
        ]]></u:java>
    </u:inSequence>
    <u:outDestination>
        <u:address type="response"/>
    </u:outDestination>
</u:target>
</u:proxy>