diff options
author | dims <dims@13f79535-47bb-0310-9956-ffa450edef68> | 2008-06-17 00:23:01 +0000 |
---|---|---|
committer | dims <dims@13f79535-47bb-0310-9956-ffa450edef68> | 2008-06-17 00:23:01 +0000 |
commit | bdd0a41aed7edf21ec2a65cfa17a86af2ef8c48a (patch) | |
tree | 38a92061c0793434c4be189f1d70c3458b6bc41d /sandbox/sebastien/java/sca-node/demos/load-balancing-webapp/README |
Move Tuscany from Incubator to top level.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@668359 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sandbox/sebastien/java/sca-node/demos/load-balancing-webapp/README')
-rw-r--r-- | sandbox/sebastien/java/sca-node/demos/load-balancing-webapp/README | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/sandbox/sebastien/java/sca-node/demos/load-balancing-webapp/README b/sandbox/sebastien/java/sca-node/demos/load-balancing-webapp/README new file mode 100644 index 0000000000..b7bbb64b1a --- /dev/null +++ b/sandbox/sebastien/java/sca-node/demos/load-balancing-webapp/README @@ -0,0 +1,76 @@ +WebApp Load Balancing Demo +=========================== + +Demonstrates balancing load acoss SCA services by deploying an SCA composite +to two tomcat servers in a cluster. The tomcat servers sit behind an Apache +server which directs load to one or other tomcat server based on a set of rules. + +The mvn pom distributed with this sample will download, install and configure +two Tomcat servers automatically to act as workers. You need to install the +Apache web server and configure it manually. + +1 - Install and configure the Tomcat workers + +mvn + +This results in two tomcat servers at + +target/tomcat-8085 +target/tomcat-8086 + +2 - Install and configure the Apache server to balance load + +In this case we've chosen to use the native JK connector. There are several +resources that tell you how to configure Apache for load balancing Tomcat with +the JK connector. For example, + +http://tomcat.apache.org/connectors-doc/webserver_howto/apache.html +http://www.crazysquirrel.com/computing/debian/servers/tomcat55.jspx + +Here is a high level summary + +Download the latest version of Apache 2.2 (this demo was built with Apache 2.2.6) + http://httpd.apache.org/ + Install in a local director called, say, apache + +Download the mod_jk module (in binary form if you can) + http://tomcat.apache.org/download-connectors.cgi + Install it in apache/modules + +Configure the mod_jk module + Copy src/test/resources/apache-80/conf/workers.properties to apache/conf + Append the contents of src/test/resources/apache-80/conf/httpd.conf to apache/conf/httpf.conf + +3 - Start the apache and tomcat servers + +In three command prompts + +cd target/tomcat-8085 +bin/catalina run + +cd target/tomcat-8086 +bin/catalina run + +cd apache +bin/httpd + +4 - Run the client + +run the LanchClient program - TBD - need a script + +5 - Result + +The client will make 10 calls to the SCA service described in the helloworldws.composite that +is part of the webapp deployed to the tomcat servers. You will see the result of this +service call reported at the client in the form + +Called getGreetings +Hello World 6 + +If you look at the Tomcat consoles you will see that each server deals with half the requests +as the load is balanced equally between the two of them. + + + + + |