Hi Markus,

do you think of using cluster to increase the reply speed?
In this case you have to move to Enhydra Enterprise 4
with Director. Because JOnAS itself does not support
clustering.

I attach the answer from Lucas McGregor about
load balancing in JOnAS (you also can find this
in the older threads)

Regards,
Also upgrading the hardware should help a bit ;-)
-- 
---------------------------------------------------
Blasius Lofi Dewanto
---------------------------------------------------
OpenUSS - Open University Support System
http://openuss.sourceforge.net
---------------------------------------------------
E-Mail   : [EMAIL PROTECTED]
ICQ      : 39343280
---------------------------------------------------

As far as I know there is no easy solution to make JOnAS load balance
itself.

You will need to get some sort of load balancing front end. 

One approach is to use apache+tomcat. Using mod_jk and the ajp13 and lb
(load balancer) workers, you can set up apache to proxy servlet request
to
multiple tomcats. These tomcats can all exist in the same or separate
machines. Each tomcat would be bound to a single JOnAS instance. The
mod_jk+tomcat allows apache to provide for sticky sessions. This means
that
when a user hits apache and apache forwards the request to the first
available tomcat,  apache will keep sending the user back to that
instance
of Tomcat. 

        Once tomcat creates a session, it places a worker tag in the
cookie.
So any apache who is running an identically configured mod_jk will keep
sending that user back to the same tomcat--thus keeping them to the same
sessions.


JOnAS   JOnAS
  ||           ||
Tomcat  Tomcat
    \\        //
     Apache


Set up Apache with mod_jk (http://www.apache.org). Create a mod_jk
config
file and use the include tag in your http.conf.

Line from my httpd.conf
## BEGIN MOD_JK PROXY CONF ###
Include /export/home/lucas/httpd/conf/mod_jk.conf

My mod_jk.conf
#
# The following line instructs Apache to load the jk module
#
LoadModule jk_module /usr/apache/libexec/mod_jk.so
JkWorkersFile /export/home/lucas/tomcat/conf/workers.properties
JkLogFile /export/home/lucas/httpd/logs/mod_jk.log


# Log level to be used by mod_jk
#
JkLogLevel debug

# The following line makes apache aware of the location of the /nw2.0
context
#
Alias /servlet "/export/home/lucas/tomcat/webapps/nw2.0"
<Directory "/export/home/lucas/tomcat/webapps/nw2.0">
    Options Indexes FollowSymLinks
</Directory>

JkMount /servlet/* loadbalancer

# The following line prohibits users from directly accessing WEB-INF
#
<Location "/servlet/WEB-INF/">
    AllowOverride None
    deny from all
</Location>

# The following line prohibits users from directly accessing META-INF
#
<Location "/servlet/META-INF/">
    AllowOverride None
    deny from all
</Location>


Notice that I send all the /servlet/* request to my loadbalancer worker.
It
is an lb worker that I set up in my worker.properties file:

Lines from my worker.properties
worker.list=ajp13s1, ajp13s2, loadbalancer

worker.ajp13s2.port=9002
worker.ajp13s2.host=solaris2
worker.ajp13s2.type=ajp13
worker.ajp13s2.lbfactor=1

worker.ajp13s1.port=9002
worker.ajp13s1.host=solaris1
worker.ajp13s1.type=ajp13
worker.ajp13s1.lbfactor=1

worker.loadbalancer.balanced_workers=ajp13s1, ajp13s2


In this file I create to ajp13 workers: ajp13s1 and ajp13s2. These are
the
workers that carry servlet request from apache to tomcat via the ajp13
protocol. s1 and s2 are two separate instance of tomcat. The last line
creates the loadbalancer worker and tells it to balance between the
ajp13s1
and ajp13s2 workers. each worker has a lbfactor which tells it what
ratio of
the work it should handle.

So my mod_jk.conf tells apache to sent all request for URL's in my
servlet
directory to be sent to the loadbalancer worker, which in turn
round-robins
between my two tomcat servlet engines. These act as fronts to my JOnAS.

If I set up another Apache, as long as I give it the same workers and
worker
names it will can work with the cluster--because the sticky sessions are
all
based on the worker names. So then I can just do something mundane like
DNS
round-robin for the apache and let it and tomcat handle more complex
load
balancing issues.

I hope that was what you were looking for, or at least helps.


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".

Reply via email to