Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am looking for a load balancer that:

  • Is good stuff (free, open source, documented)
  • Handles SSL
  • Workers register in the load balancer, instead of listing workers (like jboss mod_cluster)
  • works with apache tomcat (unlike jboss mod_cluster)

Anyone knows a load balancer that can do this?

share|improve this question

migrated from stackoverflow.com Oct 18 '10 at 20:04

This question came from our site for professional and enthusiast programmers.

    
If it's really good stuff, it's neither free, nor open source, nor well documented! –  Michael Goldshteyn Oct 18 '10 at 18:31
    
how constructive :) –  Julio Faerman Oct 18 '10 at 18:53
    
and invalid..... –  KevinDTimm Oct 18 '10 at 18:56
    
@Kevin, that was meant as a joke. Maybe I'll add a smiley in next time, to resolve any ambiguity. –  Michael Goldshteyn Oct 18 '10 at 19:15
3  
Without the smiley, it's not a joke ;) –  KevinDTimm Oct 18 '10 at 19:41

2 Answers 2

ServerFault uses HAProxy (free, open source, handles SSL w/stunnel, runs tests against clustered servers instead of waiting for clustered servers to register, and supports a wide variety of configurations).

Here's an HAProxy/Tomcat howto if you're interested in trying it out.

share|improve this answer
    
sounds good, thanks –  Julio Faerman Oct 19 '10 at 12:44

You can use mod_cluster with Tomcat 6+. Mod_cluster 1.2.1+ works good :-) Follow: http://docs.jboss.org/mod_cluster/1.2.0/html_single/

EDIT: [Scott Pack, Sep 24 at 17:01] was right, here you go: Apache uses multicast for advertiding its presence to potential worker nodes. These worker nodes send messages to the Apache balancer. These messages contain available contexts, session settings and current load calculated on the worker node.

E.g.

Apache configuration:

<IfModule manager_module>
    Listen mybox:8888
    ManagerBalancerName mycluster
    <VirtualHost mybox:8888>
        <Location />
         Order deny,allow
         Deny from all
         #Security concern...
         Allow from all
        </Location>

        AdvertiseGroup 224.0.1.105:6666
        EnableMCPMReceive

        <Location /mcm>
           SetHandler mod_cluster-manager
           Order deny,allow
           Deny from all
           #Security concern :-)
           Allow from all
        </Location>

        SSLEngine on
        SSLCipherSuite AES128-SHA:ALL:!ADH:!LOW:!MD5:!SSLV2:!NULL
        SSLCertificateFile /meh/httpd/certs/Server/server.crt
        SSLCertificateKeyFile /meh/httpd/certs/Server/server.key
        SSLCACertificateFile /meh/httpd/certs/Server/myca.crt
        SSLVerifyClient require
        SSLVerifyDepth  10

    </VirtualHost>
</IfModule>

Tomcat6 configuration in server.xml:

<Listener
    className="org.jboss.modcluster.container.catalina.standalone.ModClusterListener"
    advertise="true"
    advertiseGroupAddress="224.0.1.105"
    advertisePort="6666"
    stickySession="true"
    stickySessionForce="false"
    stickySessionRemove="true"

    ssl="true"
    sslKeyStorePass="tomcat"
    sslKeyStore="/meh/tomcat6/certs/Client/test.p12"
    sslKeyStoreType="PKCS12"
    sslTrustStore="/meh/tomcat6/certs/Client/ca.p12"
    sslTrustStoreType="PKCS12"
    sslTrustStorePassword="tomcat"

    loadMetricClass="org.jboss.modcluster.load.metric.impl.BusyConnectorsLoadMetric"
    loadMetricCapacity="1"
    loadHistory="9"
    loadDecayFactor="2"
/>

The aforementioned Tomcat worker will:

  • listen for balancer advertising and register with any balancer it finds
  • use sticky sessions, yet failover to another worker is permitted (stickySessionForce="false")
  • use ssl authentication with certificates (Apache<->SSL<->Tomcats)
  • use BusyConnectorsLoadMetric, that basically measures number of threads being busy serving requests

HTH

  • List item
share|improve this answer
    
Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. –  Scott Pack Sep 24 '12 at 17:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.