RE: Redirection and Load Balancing

2001-08-09 Thread Paul Nock

We're running Linux, Tomcat 3.n (currently 3.2.2), and Apache 1.3.19 (and
also 1.3.12).

We did rebuild binaries, but didn't really need to.  The only weird thing we
did was so the hardware load balancer in front of our servers kept cookie
and/or jsessionid sessions on the same physical hardware so mod_jk
loadbalancing could do its thing.

Tomcat:
server*.xml: one for each tomcat JVM, then in your startup script do
something like:
java -Dtomcat.home=${TOMCAT_HOME} org.apache.tomcat.startup.Tomcat -f
${TOMCAT_HOME}/conf/server1.xml "$@"
so you can run everythint out of the same tomcat home.

workers.properties:
worker.list=lbworker, worker1, worker2,...

# duplicate these lines for every worker... (not lbworker)
worker.worker1.port=   # matching the port number from this
instances server*.xml file
worker.worker1.host=localhost  # never tried a remote machine, but you
could
worker.worker1.type=ajp13  # or ajp12 if you're using it
worker.worker1.lbfactor=2  # we don't use this
worker.w1a.cachesize=1 # or this

worker.lbworker.type=lb
worker.lbworker.balanced_workers=worker1, worker2,...

ModJk.conf: use the auto-generated file as a template and mount the contexts
you want to balance on the lb worker...
JkMount /servlet/* lbworker

Apache: append the ModJk.conf file to httpd.conf

Paul

-Original Message-
From: George Shafik [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 08, 2001 5:10 PM
To: [EMAIL PROTECTED]
Subject: Re: Redirection and Load Balancing



Sounds great Paul.

What sort of environment are you using mod_jk in  ?
- OS platform
- Version of Apache, Tomcat
- How many versions of Apache and Tomcat are you running in parallel in
order to mirror your Web Site so you can perform your load balancing.
- Are all your binaries custom built ?

Can you please e-mail me directly all relevant Apache/Tomcat configuration
files that I need to alter in order to use mod_jk in the manner you
describe. If this is too difficult cut and past the relevant pieces
commenting on where they are from into one file.

Regards,
George Shafik
[EMAIL PROTECTED]


- Original Message -
From: "Paul Nock" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 09, 2001 8:44 AM
Subject: RE: Redirection and Load Balancing


> You can use mod_jk to load balance between different JVMs running Tomcat.
> Works well, we use it.
>
> The JVMs could then also be on remote machines to either each other,
and/or
> the machine running Apache.
>
> mod_jk will preserve sessions for you so that subsequent request go to the
> right JVM.
>
> You'll need to configure the workers.properties, etc. to use the
> 'loadbalancer' worker.
>
> Paul
>
> -Original Message-
> From: George Shafik [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 08, 2001 3:40 PM
> To: [EMAIL PROTECTED]
> Subject: Redirection and Load Balancing
>
>
> Hi All,
>
> Current System Architecture
> Apache : 3.17 (Custom Build)
> Tomcat : 3.2.2 (Custom Build)
> Deployment : war files.
> Platform : Red Hat Linux 6.2
>
> We are after a method to redirect based on a limit on the number of page
> hits or the load on the current Web Server.
>
> The redirection needs to be performed by Apache or Tomcat not by the web
> page itself. Currently we are redirecting the user to another Web Server
> from the current page as the page hits reach a certain limit or the load
is
> too much on the current box. A better way to conduct this is to redirect
the
> call to another Web Server at the Web Server or Servlet Engine level, in
our
> case that's Apache or Tomcat. Its not clear to us where in Apache or
Tomcat
> we can configure things based on page hits or load if its possible to do
at
> all.
>
> Many thanks in advance for any help in this area.
>
> Regards,
> George Shafik
>
>
>
>





RE: Redirection and Load Balancing

2001-08-08 Thread Paul Nock

You can use mod_jk to load balance between different JVMs running Tomcat.
Works well, we use it.

The JVMs could then also be on remote machines to either each other, and/or
the machine running Apache.

mod_jk will preserve sessions for you so that subsequent request go to the
right JVM.

You'll need to configure the workers.properties, etc. to use the
'loadbalancer' worker.

Paul

-Original Message-
From: George Shafik [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 08, 2001 3:40 PM
To: [EMAIL PROTECTED]
Subject: Redirection and Load Balancing


Hi All,

Current System Architecture
Apache : 3.17 (Custom Build)
Tomcat : 3.2.2 (Custom Build)
Deployment : war files.
Platform : Red Hat Linux 6.2

We are after a method to redirect based on a limit on the number of page
hits or the load on the current Web Server.

The redirection needs to be performed by Apache or Tomcat not by the web
page itself. Currently we are redirecting the user to another Web Server
from the current page as the page hits reach a certain limit or the load is
too much on the current box. A better way to conduct this is to redirect the
call to another Web Server at the Web Server or Servlet Engine level, in our
case that's Apache or Tomcat. Its not clear to us where in Apache or Tomcat
we can configure things based on page hits or load if its possible to do at
all.

Many thanks in advance for any help in this area.

Regards,
George Shafik







RE: Load Balancing for WEB-Application with sessions

2001-07-23 Thread Paul Nock

jk_mount/loadbalancing works well for this kind of thing.  We use it
loadbalancing across multiple servers, with multiple JVMs on each server.

The only issue we had was in the way our (Foundry) loadbalancer handled
things:

We needed session state preserved by cookie or sessionid, and it proved
'difficult' to make the loadbalancer work in this way with the default
tomcat session state stuff, ie.
cookie name = JSESSIONID
or
http://blah.com/blah/blah;jsessionid=BB.ident

Problem is the loadbalancer pattern matching used to preserve sessions by
URL couldn't do matching for cases like:
http://blah.com/blah/blah;jsessionid=*.worker
where the pattern to be matched is the ;jsessionid=*.worker

Cookie matching wasn't much better either, so we resorted to adding an extra
cookie in our application that was purely for use by the loadbalancer to
send the request to the right machine.

What we resorted to was rebuilding tomcat changing the name of 'jsessionid'
to something that identified the node so the loadbalancer knew where to send
it.

Works fine, if a bit messy due to hardware limitations.

Paul

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 23, 2001 2:16 AM
To: [EMAIL PROTECTED]
Subject: Load Balancing for WEB-Application with sessions


Hi,

For improving the performace, we are going to serve requests with many
computers. Here, a problem with redirection arises. As a rule, the requests
are randomly redirected to the existent servers, and it functions well for
undependent pages and servlets. We have to ensure that a hole session is
processed on (redirected to) the same server. Are there possibilities to do
it in Tomcat, or we have to write a redirector-servlet ourselves, to
control the redirections according to the session.

Mit freundlichen Grüßen

Christian Schildt
Diplom-Betriebswirt (FH)

Softwaredeveloper

Phone: 089/89013023
Mailto:  [EMAIL PROTECTED]

ELAXY AG
Gutenbergstr. 5
D-82178 Puchheim bei München
Phone: +089/8901300
Fax:   +089/89013089
www.elaxy.com