Child pages
  • Apache HTTP Server Configuration

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Smart clients will connect directly to the individual Servoy Application Servers in the cluster. The load-balancing is done by serving the JNLP file from different servers when the Apache HTTP front-end is accessed. Add to each of the Servoy Application Server's "servoy.properties" files the following line (needed for smart client Smart Client load balancing):

Code Block
servoy.jnlpCodebaseOverride=http://thisServersHostnameAsSeenByClients:port

What you should also take into consideration when setting up a load-balanced cluster, is allowing smart-clients to connect directly to individual servers in the cluster. This means that all Servoy Application Servers should be accessible from the client side - and you might want to isolate the cluster so that connections to ports used by Terracotta (see tc-config.xml) are only allowed from withing within the cluster, even if connections from client machines on Servoy ports should be allowed to all Servoy Application Servers.

3.1 Configure Apache HTTP Server

  • install Install downloaded Apache HTTP Server.
  • apply Apply any standard configuration that you want/need (ServerName, ServerAdmin, ...) if any is needed to make HTTP server operational.
  • Wiki Markup
    copyCopy your mod_jk-1.2.28-httpd-2.2.3.so to *_\[randd:yourApacheHTTPServerDir\]/modules{_}* and rename it to *mod_jk.so*. (name might be slightly different depending on OS; see instructions on download page)
  • Wiki Markup
    inIn *\[randd:yourApacheHTTPServerDir\]/conf/httpd.conf* (for more info on available options, see [http://tomcat.apache.org/connectors-doc/webserver_howto/apache.html|http://tomcat.apache.org/connectors-doc/webserver_howto/apache.html]) add these lines after all other LoadModule lines:
    Code Block
    LoadModule jk_module modules/mod_jk.so
    # JK/Worker configuration
    
        # Where to find workers.properties
        JkWorkersFile conf/workers.properties
        # Where to put jk logs
        JkLogFile logs/mod_jk.log
        # Set the jk log level [debug/error/info]
        JkLogLevel    info
        JkMount /* loadbalancer
    
        # In case you want to be able to monitor JK status
        # <Location /jkmanager/>
        #    JkMount jkstatus
        #    Order deny,allow
        #    Deny from all
        #    Allow from 127.0.0.1
        # </Location>
    
  • Wiki Markup
    copyCopy *worker.properties* file from *\[randd:yourServoyApplicationServerDir\]/terracotta* to *\[randd:yourApacheHTTPServerDir\]/conf*. It will load balance a cluster of two Servoy serversServers, running on 2 different machines, both using port 8009. You will need to change the "worker.servoy{*}X*.host" entries in "worker.properties" file to the correct hostnames of your Servoy Application Servers. It is recommended to use port 8009 as well for all workers (default). If you have more/less than two servers, create/remove sections and update *worker.list* and *worker.loadbalancer.balance_workers* lines. For more information on how to tune your workers, see [http://tomcat.apache.org/connectors-doc/reference/workers.html|http://tomcat.apache.org/connectors-doc/reference/workers.html].

...

This will describe how to set up the two Tomcat Servers in your Servoy installations as used by original worker.properties file above. You can adapt it when using more Servoy installations.

  • assume Assume Servoy is installed twice, once on "servoyServer1Host" and once on "servoyServer2Host".
  • Wiki Markup
    inIn \[randd:servoy_install_folder\]/application_server/server/conf/server.xml:
    • change Change line "<Engine name="Catalina" defaultHost="localhost">" into "<Engine jvmRoute="servoy1" name="Catalina" defaultHost="localhost">"; for second server use "servoy2".
    • add Add the following connector before the already declared one in both installations:
      Code Block
      <Connector port="8009"
                 enableLookups="false" maxThreads="500" connectionTimeout="60000"
                 redirectPort="8443" useBodyEncodingForURI="true" protocol="AJP/1.3"/>
      

...