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=number   # 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-09 Thread George Shafik

Magic Paul!

Just a correction on the version of Apache we are running - 1.3.12 and still
trialing 1.3.19.


 worker.worker1.host=localhost  # never tried a remote machine, but you
Point of confusion
Are you running your tomcats (JVMs) on separate servers ?
If so how do you determine when load balancing kicks in and its
effectiveness ?
Or do you do what most of us do and wait for bitter complaints about
performance ?


 # duplicate these lines for every worker... (not lbworker)
 worker.worker1.port=number   # matching the port number from this
Our main gateway machine is a Linux box (sits behind our firewall) and we
use port mapping to resolve respective URL calls to the appropriate Web
Server. This is the only way we found in order to integrate IIS4/5 into our
Web Site alongside tomcat.  My main concern is how are you resolving the URL
calls to the appropriate server. Its clear you will have duplicate document
structures on each of the JVMs but is this where things get resolved ?


George

- Original Message -
From: Paul Nock [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, August 10, 2001 7:31 AM
Subject: RE: Redirection and Load Balancing


 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=number   # 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

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: Redirection and Load Balancing

2001-08-08 Thread Mandar Joshi


Is it possible to use mod_jk with standalone tomcat ?

Thanks for your help
Mandar

-Original Message-
From: Paul Nock [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 08, 2001 3:44 PM
To: [EMAIL PROTECTED]
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 Tim O'Neil

At 03:51 PM 8/8/2001, you wrote:

Is it possible to use mod_jk with standalone tomcat ?

No, mod_jk is an apache binary module. How could tomcat
alone use it?




RE: Redirection and Load Balancing

2001-08-08 Thread Mandar Joshi

Then is there any mechanism on tomcat standalone for load balancing ?

Thanks
Mandar

-Original Message-
From: Tim O'Neil [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 08, 2001 4:02 PM
To: [EMAIL PROTECTED]
Subject: RE: Redirection and Load Balancing


At 03:51 PM 8/8/2001, you wrote:

Is it possible to use mod_jk with standalone tomcat ?

No, mod_jk is an apache binary module. How could tomcat
alone use it?



Re: Redirection and Load Balancing

2001-08-08 Thread George Shafik


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